Giter VIP home page Giter VIP logo

Comments (3)

Micro-sheep avatar Micro-sheep commented on August 28, 2024

以日期为时间段的数据会更好。如果你想仅获取多日的的指定时间点的数据,那么可以使用 pandas 的筛选功能(返回的数据绝大多数是 pandas.DataFrame 或者 pandas.Series)。以获取 2021年7月10:30 这个时间点的数据为例,示例代码如下

import efinance as ef
df = ef.stock.get_quote_history('600519',
                                beg='20210701',
                                end='20210731',
                                klt=30)
# 从日期里面取出时间
df['时间段'] = df['日期'].apply(lambda x: x.split()[-1])
# 筛选出 时间点为 10:30 的数据
target_df = df.query('时间段 == "10:30"')
print(target_df)

image

from efinance.

six7ths avatar six7ths commented on August 28, 2024

好的,收到,我来试试。

不过,若我只需要一个时点数据,却取回来整体数据,会不会增加网页接口负担呢?我担心的是这个

from efinance.

Micro-sheep avatar Micro-sheep commented on August 28, 2024

好的,收到,我来试试。

不过,若我只需要一个时点数据,却取回来整体数据,会不会增加网页接口负担呢?我担心的是这个

这个不需要担心。接口很稳定,并发量大。

from efinance.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.