Forum Discussion
009co
Helper IV
4 years agoBasic Power BI Python weirdness - getting "Python script error. KeyError: '
Very basic Power BI Python weirdness happening. I create Python visual, drag two columns in values, one column is a text value and the other column is a whole number. I just want to plot the ...
- 4 years ago
# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script: # dataset = pandas.DataFrame(Status, Days) # dataset = dataset.drop_duplicates() import matplotlib.pyplot as plt dataset.plot(x='Status', y='Days', kind='bar') plt.show()
Greg_Deckler
Community Champion
4 years ago# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:
# dataset = pandas.DataFrame(Status, Days)
# dataset = dataset.drop_duplicates()
import matplotlib.pyplot as plt
dataset.plot(x='Status', y='Days', kind='bar')
plt.show()