I'm trying to plot a dataframe with two columns:
Compound_ID,Averages
0 M0001,0.75
1 M0002,0.87
2 M003,0.45
Instead of showing the 'Compound_ID' on the x axis it is showing the index. When I explicitly try to plot, it raises and error.
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
df = pd.read_csv('teste.csv')
plt.plot(df['Averages'], df['Compound_ID'])
plt.show()
AttributeError: 'Series' object has no attribute 'find'
It is probably something easy to solve, but can someone take a look at my code?
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
df = pd.read_csv('teste.csv')
plt.plot(df['Averages'])
plt.show()
df.plot.bar(x='Compound_ID', y='Averages', rot=0)?