I want to count particular column occurrence in Dataframe with given below Dataframe ?
is dataframe allow operation only on alphabetical column names instead of numeric column name ?
import pandas as pd diSales= { 2016:{'qtr1':34500,'qtr2':56000,'qtr3':47000,'qtr4':49000}, 2017:{'qtr1':44900,'qtr2':46100,'qtr3':57000,'qtr4':59000}, 2018:{'qtr1':54500,'qtr2':51000,'qtr3':57000,'qtr4':58500}, 2019:{'qtr1':61000} } ks = pd.DataFrame(diSales) ptr = ks.2016.count() print(ptr)but when i was trying then showing error " invalid syntax ?
is dataframe allow operation only on alphabetical column names instead of numeric column name ?