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

Popular posts from this blog

Editing Python Class in Shell and SQLAlchemy -

rest - Basic cxfrs RESTful JAX-RS Service -

ajax - Decimal('12000') is not JSON serializable -