There is a function that I don't understand when I draw a graph with matplotlib.

Asked 2 years ago, Updated 2 years ago, 85 views

data =pd.read_csv('spx.csv',index_col=0,parse_date=True)

What do the index_col=0 and parse_date=True options mean here?

I'm not sure if I'm going through the documentsㅠ<

mathplotlib

2022-09-22 21:44

1 Answers

Note Link

Please refer to the link above. Here's a quick summary.

index_col Specifies the column to use as the label (index name) for the row. Use multiple indexes to give multiple values.

parse_dates If true, attempts to interpret the above index column as a date.


2022-09-22 21:44

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.