filmov
tv
How to select multiple columns of DataFrame - Using Python and Jupyter Notebook

Показать описание
There are several ways to select a column from a pandas dataframe. Here are some of the ways that we can use to select columns:
Assuming df is a dataframe containing several column called A, B, C, "Book Store," then we select column A as follows:
df['A'] or df.A
We can select multiple columns as follows:
df[ ['A', 'C', 'Book Store']]
Assuming df is a dataframe containing several column called A, B, C, "Book Store," then we select column A as follows:
df['A'] or df.A
We can select multiple columns as follows:
df[ ['A', 'C', 'Book Store']]