Home>
An error occurs when you try to store data and make it a Sankey chart.
I don't know why.
Is it simply because the data types do not match?
Thank you.
df = pd.read_gbq (query, 'business-intelli-0099')
from ipysankeywidget import SankeyWidget
SankeyWidget (links = df.to_dict ('records'))
Error details
KeyError Traceback (most recent call last)
<ipython-input-113-3162edfdae41>in<module>
1 from ipysankeywidget import SankeyWidget
---->2 SankeyWidget (links = df.to_dict ('records'))
~ \ AppData \ Local \ Continuum \ anaconda3 \ lib \ site-packages \ ipysankeywidget \ sankey_widget.py in __init __ (self, ** kwargs)
51 values = set ()
52 for i, link in enumerate (kwargs.get ('links', [])):
--->53 linksource = link ['source']
54 linktarget = link ['target']
55 if 'type' in link:
KeyError: 'source'
-
Answer # 1
Related articles
- in unity, an error occurs when trying to read a csv file containing a double-byte character string
- python max () arg is an empty sequence and an error occurs and it cannot be processed well
- python: an error occurs that the type is different in the output using dict key values
- python - in raspberry pi, the error occurs only in the case of the automatic start program using systemd
- python - an error occurs in the if statement program that compares the size of numbers
- i get an error when trying to average a list in python
- python - an error occurs when django's summer note is reflected in admin
- [vba] an error occurs when trying to save a recordset to adodbstream
- python 3x - an error occurs after registering a dictionary with a read-aloud bot on discordpy
- python 3x - error after changing to csv file
- python - i get an error when i type pip3 install scikit-learn
- python - i want to display an image with pysimplegui, but an error occurs
- python - error when scraping with selenium and firefox
- [python] graphviz output format error
- python - web scraping what to do when a webdriverexception occurs on starbucks hp
- i get an error when trying to push in sourcetree
- python - i get an error when connecting to a voice channel with discordpy
- python 3x - best estimator: i get an error with no syntax, so please tell me what to do
- an error occurs during python scraping (retrieving property information from suumo)
- file gets corrupted when trying to edit a pdf file in python
Related questions
- macos (osx) - python: exporting the list to txt gives "" double quotes
- python 3x - i'm not sure how to index pandas df
- "openpyxl" cannot be imported in python
- python 3x - dataframe column labels are unchanged
- python - i want to get the elements in the linked site
- python 3x - i want to concatenate data using pandas merge, but it doesn't work
- about reading files
- python - i want to create a new dataframe by repeating the work of extracting the average value of the dataframe
- numpy - [python] i want to combine alternately and make two sets of two arrays of latitude and longitude
- python 3x - replace does not change
Solved.
Resolve by changing column name