How it works...

The DataFrame indexing operator is very flexible and capable of accepting a number of different objects. If a string is passed, it will return a single-dimensional Series. If a list is passed to the indexing operator, it returns a DataFrame of all the columns in the list in the specified order

Step 2 shows how to select a single column as a DataFrame rather than as a Series. Most commonly, a single column is selected with a string, resulting in a Series. When a DataFrame is the desired output, simply put the column name in a single-element list.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.209.201