开发者

Is there a way to make separate dataframes from one dataframe?

开发者 https://www.devze.com 2022-12-07 22:01 出处:网络
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 sep

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消