ColumnGet
Gets one or more columns from a dataframe. For each column provided, a different variable will be created. For example, if you get the columns Age and Gender, two variable will be created, age and gender, that will be the respective columns. Each variable will be of the type Series from Pandas.
Options
columns: Specifies columns to retrieve
Examples
Example 1 - Get a Single Column
Sometimes you only want to look at a single column within a dataframe. This example shows how to extract the values of the Rating column on its own, allowing you to work with it independently of the rest of the dataset.
#> ColumnGet Rating
AFLEFT
rating = pizzeriasDf['Rating'] AFRIGHT
Example 2 - Get Multiple Columns
You may want to pull out specific columns from the dataframe to examine or work with side-by-side. This example extracts the Location and Specialty Pizza columns so that we can focus only on those fields and ignore the others.
#> ColumnGet Location Specialty Pizza
AFLEFT
location = pizzeriasDf['Location']
specialtyPizza = pizzeriasDf['Specialty Pizza'] AFRIGHT