/Volumes/DATA/M2/getequle.py:43: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result.sort_values(axis=0,ascending=True,by=["date"],inplace=True)
/Volumes/DATA/M2/getequle.py:46: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result["equal"]=result["eq"]/result["count"]
/Volumes/DATA/M2/getequle.py:81: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
result["year"]=pd.to_datetime(result["date"]).dt.year
深圳市场
date open high ... eqt lowcount highcount
79 1991-01-14 2.462870 2.462870 ... 2.46 2.46 2.46
82 1991-01-15 2.450540 2.450540 ... 2.45 2.45 2.45
88 1991-01-17 2.438142 2.438142 ... 2.44 2.44 2.44
103 1991-01-22 2.400909 2.400909 ... 2.40 2.40 2.40
106 1991-01-23 2.388453 2.388453 ... 2.39 2.39 2.39
... ... ... ... ... ... ... ...
37633 2025-04-23 20162.014715 20568.891206 ... 20216.18 19889.74 20568.89
37636 2025-04-24 20306.576451 20633.519040 ... 20249.72 19908.16 20633.52
37639 2025-04-25 20198.266359 20632.825247 ... 20278.93 19924.16 20632.83
37648 2025-04-28 20216.361998 20496.234203 ... 20062.62 19759.59 20496.23
37651 2025-04-29 19846.300000 20310.640000 ... 20007.51 19615.97 20310.64
[8340 rows x 24 columns]