daemon

/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

0 1990-12-19 0.928124 0.969024 ... 0.02 0.93 0.97

3 1990-12-20 0.960368 0.961810 ... 0.01 0.96 0.96

6 1990-12-21 1.270855 1.323154 ... 0.02 1.27 1.32

15 1990-12-24 1.337790 1.387893 ... 0.02 1.34 1.39

18 1990-12-25 1.451224 1.451224 ... 0.03 1.45 1.45

... ... ... ... ... ... ... ...

37632 2025-04-23 26956.366117 27436.947326 ... 27025.60 26645.22 27436.95

37635 2025-04-24 27118.732117 27519.547953 ... 27073.89 26679.06 27519.55

37638 2025-04-25 27014.305758 27490.981148 ... 27090.75 26694.40 27490.98

37647 2025-04-28 26944.520000 27277.960000 ... 26771.08 26394.05 27277.96

37650 2025-04-29 26626.620000 27217.110000 ... 26821.85 26316.85 27217.11

[8389 rows x 24 columns]