pandas get collums code example
Example 1: list of particular column in pandas dataframe
print(df.columns)
Example 2: select columns pandas
df1 = df.iloc[:,0:2] # Remember that Python does not slice inclusive of the ending index.
print(df.columns)
df1 = df.iloc[:,0:2] # Remember that Python does not slice inclusive of the ending index.