I am trying to access a column by its index number in a Pandas data-frame using iloc:
new = df_new.iloc[:,0]
throws out the error :
IndexingError: Too many indexers
Other posts on iloc show them working fine. Don't understand why is this happening with me . Please help !!
The data-frame is :
Games 3862 Entertainment 535 Education 453 Photo & Video 349 Utilities 248 Health & Fitness 180 Productivity 178 Social Networking 167 Lifestyle 144 Music 138 Shopping 122 Sports 114 Book 112 Finance 104 Travel 81 News 75 Weather 72 Reference 64 Food & Drink 63 Business 57 Navigation 46 Medical 23 Catalogs 10
and was created by the code :
df_new=obj_df["prime_genre"].value_counts()
by count of the number of categories of another data-frame