akshare 1.16.75__py3-none-any.whl → 1.16.76__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
akshare/__init__.py CHANGED
@@ -3084,9 +3084,10 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
3084
3084
  1.16.73 fix: fix stock_board_industry_hist_em interface
3085
3085
  1.16.74 fix: fix stock_individual_spot_xq interface
3086
3086
  1.16.75 fix: fix get_qhkc_index interface
3087
+ 1.16.76 fix: fix spot_quotations_sge interface
3087
3088
  """
3088
3089
 
3089
- __version__ = "1.16.75"
3090
+ __version__ = "1.16.76"
3090
3091
  __author__ = "AKFamily"
3091
3092
 
3092
3093
  import sys
akshare/spot/spot_sge.py CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- coding:utf-8 -*-
2
2
  # !/usr/bin/env python
3
3
  """
4
- Date: 2024/8/22 10:00
4
+ Date: 2025/4/11 22:00
5
5
  Desc: 上海黄金交易所-数据资讯-行情走势
6
6
  https://www.sge.com.cn/sjzx/mrhq
7
7
  上海黄金交易所-数据资讯-上海金基准价-历史数据
@@ -94,6 +94,15 @@ def spot_quotations_sge(symbol: str = "Au99.99") -> pd.DataFrame:
94
94
  }
95
95
  )
96
96
  temp_df["现价"] = pd.to_numeric(temp_df["现价"], errors="coerce")
97
+ # 将更新时间中的时间部分提取出来
98
+ update_time = temp_df["更新时间"].iloc[0].split()[1]
99
+ # 将时间列转换为时间格式以便排序
100
+ temp_df["时间"] = pd.to_datetime(temp_df["时间"], format="%H:%M").dt.time
101
+ # 过滤掉大于等于更新时间的数据
102
+ temp_df = temp_df[temp_df["时间"].astype(str) < update_time]
103
+ # 按时间排序
104
+ temp_df = temp_df.sort_values(by=["时间"])
105
+ temp_df.reset_index(inplace=True, drop=True)
97
106
  return temp_df
98
107
 
99
108
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: akshare
3
- Version: 1.16.75
3
+ Version: 1.16.76
4
4
  Summary: AKShare is an elegant and simple financial data interface library for Python, built for human beings!
5
5
  Home-page: https://github.com/akfamily/akshare
6
6
  Author: AKFamily
@@ -1,4 +1,4 @@
1
- akshare/__init__.py,sha256=mFH9R0cW2wCtgC0g0XKEzcFBrnP5eswX1Jwv3by2mdQ,193144
1
+ akshare/__init__.py,sha256=M2LCAwg8ikmDw8mj9U3ClMI-_tpVADjqOo3PARyUqXI,193191
2
2
  akshare/datasets.py,sha256=rKuRNZrqi6IMsZ9nyvO3Rx02js0tH3zMLjz8HQNAoPQ,963
3
3
  akshare/exceptions.py,sha256=WEJjIhSmJ_xXNW6grwV4nufE_cfmmyuhmueVGiN1VAg,878
4
4
  akshare/request.py,sha256=HtFFf9MhfEibR-ETWe-1Tts6ELU4VKSqA-ghaXjegQM,4252
@@ -232,7 +232,7 @@ akshare/sport/sport_olympic.py,sha256=InkuHz4So8r-0101rUzdro58zsgtr5SLuSxWjiObRG
232
232
  akshare/spot/__init__.py,sha256=BvXm1zCReGMWbcANKydbK9uvYzNU-cbReuUYbdDqunI,82
233
233
  akshare/spot/spot_hog_soozhu.py,sha256=IEt7zrDs0ptAKgMA7QRIk45jcMLcA_LGq6Y3lKLFTi0,9397
234
234
  akshare/spot/spot_price_qh.py,sha256=rRv09vR8K0U_x6x8AiLgGluxytIXkLatFNVkFbIh8eQ,3756
235
- akshare/spot/spot_sge.py,sha256=sXaUGPm8yEXogssNFyFgTlnpf363g7s3U6xO4Zyvk9g,8213
235
+ akshare/spot/spot_sge.py,sha256=fXy6I9GchX2rfdPDD2wSN8K-hcDdS3ABzLDLdH-9t4Y,8696
236
236
  akshare/stock/__init__.py,sha256=jSa9260d6aNZajaW68chI2mpPkDSXLOgi3eXrqo4MQ8,82
237
237
  akshare/stock/cons.py,sha256=pAMixwmjYARzCVWIxN7RjhjnJMpvLR2OD6mZ-zI7jlM,42990
238
238
  akshare/stock/stock_allotment_cninfo.py,sha256=OVjVdWp2XVRNbJvVgtgVVoBmPBJgBB4RyIIgA_9QHM8,6066
@@ -394,10 +394,10 @@ akshare/utils/func.py,sha256=4cwmXFztU86yJNONJ40KJLvsIEQHBbct4iMm3zT2v30,2315
394
394
  akshare/utils/multi_decrypt.py,sha256=aWoL2iEPeuXHJg8-n7OtMKixLnIhfzepACgxfrfmQB4,1657
395
395
  akshare/utils/token_process.py,sha256=nGtgnZGRprXJkhLXH8mcUH4TgIFwzsTOb0EaEPa0Euo,667
396
396
  akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
397
- akshare-1.16.75.dist-info/licenses/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
397
+ akshare-1.16.76.dist-info/licenses/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
398
398
  tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
399
399
  tests/test_func.py,sha256=j1MGYbZI2if2j_LY1S4FLsf4qfq4NwVqD5wmRlv5Log,832
400
- akshare-1.16.75.dist-info/METADATA,sha256=p7PdD8Bi0t-lyJ-pXC3sUuWb68YpzhZdG9czeEH0WyM,12591
401
- akshare-1.16.75.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
402
- akshare-1.16.75.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
403
- akshare-1.16.75.dist-info/RECORD,,
400
+ akshare-1.16.76.dist-info/METADATA,sha256=jKwqL4MrpCky7D0qAPcJRKbyTamAaDYkhajUeEHSuIM,12591
401
+ akshare-1.16.76.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
402
+ akshare-1.16.76.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
403
+ akshare-1.16.76.dist-info/RECORD,,