Giter VIP home page Giter VIP logo

Comments (4)

lwc87 avatar lwc87 commented on September 26, 2024

补充:经测,开始日期设置为2024年之前就报错,设置为2024年正常

from akshare.

albertandking avatar albertandking commented on September 26, 2024

5. get_receipt

接口测试正常;升级到最新版使用,注意参数的设置

from akshare.

StardustWhisper avatar StardustWhisper commented on September 26, 2024

是由于get_gfex_receipt()获取不到数据造成的,另外还有一个issue,有些时段获取不到'LC'代码也会报错,在函数里加上两个判断语句就正常了

    if not result_df.empty:
        result_df.loc[:, 'date'] = date.isoformat().replace("-", "")
        result_df.loc[:, 'var'] = [item.upper() for item in temp_df['varietyOrder'].tolist()]
        result_df.reset_index(drop=True, inplace=True)
        result_df.rename(columns={
            "wbillQty": "receipt",
            "diff": "receipt_chg",
        }, inplace=True)
        result_df = result_df[[
            'var', 'receipt', 'receipt_chg', 'date'
        ]]
        result_df.set_index(['var'], inplace=True)
        if 'LC' not in result_df.index:
            vars_list.remove('LC')
        result_df = result_df.loc[vars_list, :]
        result_df.reset_index(inplace=True)
        return result_df
    return None

from akshare.

albertandking avatar albertandking commented on September 26, 2024

是由于get_gfex_receipt()获取不到数据造成的,另外还有一个issue,有些时段获取不到'LC'代码也会报错,在函数里加上两个判断语句就正常了

    if not result_df.empty:
        result_df.loc[:, 'date'] = date.isoformat().replace("-", "")
        result_df.loc[:, 'var'] = [item.upper() for item in temp_df['varietyOrder'].tolist()]
        result_df.reset_index(drop=True, inplace=True)
        result_df.rename(columns={
            "wbillQty": "receipt",
            "diff": "receipt_chg",
        }, inplace=True)
        result_df = result_df[[
            'var', 'receipt', 'receipt_chg', 'date'
        ]]
        result_df.set_index(['var'], inplace=True)
        if 'LC' not in result_df.index:
            vars_list.remove('LC')
        result_df = result_df.loc[vars_list, :]
        result_df.reset_index(inplace=True)
        return result_df
    return None

感谢提供解决方案,已修复该问题,升级到 AKShare 1.12.47 使用

from akshare.

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.