>>> data
Open
Date
2020-06-15 182.809924
2020-06-16 191.040258
2020-06-17 193.159706
2020-06-18 192.139603
2020-06-19 196.685578
... ... ... ... ... ... ... ...
2021-06-08 255.160004
2021-06-09 253.809998
2021-06-10 254.289993
2021-06-11 257.989990
2021-06-14 257.899994
[252 rows x 1 columns]
>>> data['Open']
Date
2020-06-15 182.809924
2020-06-16 191.040258
2020-06-17 193.159706
2020-06-18 192.139603
2020-06-19 196.685578
...
2021-06-08 255.160004
2021-06-09 253.809998
2021-06-10 254.289993
2021-06-11 257.989990
2021-06-14 257.899994
Name: Open, Length: 252, dtype: float64
>>> data.index
DatetimeIndex(['2020-06-15', '2020-06-16', '2020-06-17', '2020-06-18',
'2020-06-19', '2020-06-22', '2020-06-23', '2020-06-24',
'2020-06-25', '2020-06-26',
...
'2021-06-01', '2021-06-02', '2021-06-03', '2021-06-04',
'2021-06-07', '2021-06-08', '2021-06-09', '2021-06-10',
'2021-06-11', '2021-06-14'],
dtype='datetime64[ns]', name='Date', length=252, freq=None)
>>> type(data)
<class 'pandas.core.frame.DataFrame'>
I have the above data already in python.
If I have the input data in TSV format, how to read it so that it is the same as above? (<TAB> is a TAB character.)
Date<TAB>Open
2020-06-15<TAB>182.809924
...
2021-06-14<TAB>257.899994