If this helped you, please share!

Pandas DataFrame axis basics (Part 2)

Published April 13, 2018 in data - 0 Comments

Part 1 covered Pandas DataFrame basics.

Pandas offers multiple options for accessing DataFrame values by axis labels using he DataFrame.loc function, or by integer indexes using the DataFrame.iloc function in one or two dimensions.

If the DataFrame has a numerical index, calling the DataFrame.loc and DataFrame.iloc functions looks the same. Otherwise, use the appropriate axis label with DataFrame.loc.

Accessing DataFrame labeled columns as attributes can be a convenient alternative to the standard subscript operator.

Tags: pandas

No comments yet

Leave a Reply: