Answers for "get column headings pandas"

7

pd dataframe get column names

lst = data.columns.values     # data is dataframe
Posted by: Guest on April-27-2020
0

get column headings pandas

import pandas as pd 
    
data = pd.read_csv("nba.csv")     

myheadings = list(data.columns) # All column headings saved as a list
Posted by: Guest on June-15-2021

Python Answers by Framework

Browse Popular Code Answers by Language