Answers for "pandas get dataframe column count"

0

count elements in columns pandas

df['COL_NAME'].count(axis=1)
Posted by: Guest on May-08-2021
0

how to count number of columns in dataframe python

import pandas as pd
df = pd.DataFrame({"pear": [1,2,3], "apple": [2,3,4], "orange": [3,4,5]})

len(df.columns)
Posted by: Guest on October-01-2021

Code answers related to "pandas get dataframe column count"

Python Answers by Framework

Browse Popular Code Answers by Language