Is there a way to make separate dataframes from one dataframe?
I have a dataframe containing stock prices from different dates ranging from 2017 to 2022. The dates are set as the index and they are formatted as开发者_开发技巧 YYYY-MM-DD. I'm trying to create separate dataframes for each year. Is there a way I can filter my data to do so?
I am new to python and am not sure of how to do this. I tried to use .iloc to pick the specific year I wanted, but it didn't work since the dates are formatted as YYY-MM-DD.
精彩评论