Jul-02-2019, 03:22 AM
(Jul-02-2019, 02:46 AM)ift38375 Wrote: I already shared code and error comes with line "ks.2016.count()" bcoz it not takes value 2016 as column.Pandas allows to get access to columns of a dataframe instance as its attributes, e.g.
df.column_name
, but you need to be careful when using this approach. It is better to use .loc
selector instead, e.g. df.loc[:, 2016].count()
.