python - Reading Variable names into a list -
A method of reading the 0th row (column / variable), looking at a CSV file that has been read in the dataframe Is the name) in a list program, can be used later?
I tried to redo the columns like this: I for the call: Column = DF [i]
< Div class = "post-text" itemprop = "text">
Just in nrows = 1
df = pd.read_csv (r'mycsv.csv ', Nrows = 1) cols = list (df.columns)
Comments
Post a Comment