Bug in tutorial process in Execute Python Operator

Caperez
Caperez Altair Community Member
edited November 2024 in Community Q&A
Hi there.
I'm trying the tutorial process "Creating a chart using Python and storing it in your repository", because I need to extract some charts from the Python package, but when I try to run the tutorial process, the process stops and shows a "Parsing failed. ". message. This is because the pandas.io.data package used in this script was removed, and Pandas now uses the pandas_datareader package to access remote data such as Yahoo, Google Analytics, etc.
Best, 
Cesar

Best Answer

  • phellinger
    phellinger New Altair Community Member
    Answer ✓
    Hey @ceaperez,

    Thanks for looking into this!

    I believe the tutorial has already been updated with the code below.
    try:
        from pandas.io.data import DataReader
    except:
        from pandas_datareader import DataReader

    On the other hand, there is now a URL error after using the correct package, let's see if we need to updated that.

    Best,
    Peter

Answers

  • phellinger
    phellinger New Altair Community Member
    Answer ✓
    Hey @ceaperez,

    Thanks for looking into this!

    I believe the tutorial has already been updated with the code below.
    try:
        from pandas.io.data import DataReader
    except:
        from pandas_datareader import DataReader

    On the other hand, there is now a URL error after using the correct package, let's see if we need to updated that.

    Best,
    Peter

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.