Dec-20-2020, 11:51 PM
Hello everyone - I am in the early stages of learning Python and decided to start with using Excel in Python. I am running the code below in Jupyter and it works well. This notebook currently has a state column and a country column. I would like to count the total number of states but I don't know how to reference the columns - could anyone please tell me how to start? I tried the second code below but that did not run.
1 2 3 4 |
import pandas as pd df = pd.read_excel (r 'C:\Users\Family\Desktop\Anaconda\Book1.xlsx' ) print (df) |
1 |
st = 'State' .count() |