The csv file I have is data that was collected into two big columns: one is the daily data I need, and the other is the variable associated on the day. I would like to break off after one year of daily data and display that data in a pandas table where the beginning to end of the first year is displayed horizontally and the variable should be just under. So, to clarify, the years should have their own column, then the daily data displayed horizontally, and variable data displayed under the respective day in the right year. Right now all of my data is combined so all the time data is in one long column, and I cannot really build my code to work with it that way.

I have looked this up before but have not found anything that really describes my situation. I was thinking maybe a splice function might help, but I don't know enough to do that and I'd also like it to be dynamic. It needs to be able to modify to other csv files, so that they read in starting at the first of one year and then display as the table.

example:

my data file looks like this:

Time Temperature  

1900-01-01 50  

1900-01-02 52  

1900-01-03 55  

... ...  

2019-04-05 60

So I would like to separate the years into one column, and have it sorted by the day horizontally(Jan 1...Dec 31) as a row header, and then sort the corresponding temperature data below into the correct year.