I am looking to plot histogram for the following dataframe (see below)
| missing_values
---------------
F1 | 123
F2 | 80
F3 | 0
.
.
F84| 20
with values represented as F1,F2,F3....F84 on x axis AND missing_Values represented on y axis Note: There is no column name associated to F1,F2...F84 as you see
Could someone advise on how to create a histogram for this? IS there any manipulation i need to do before i can plot histogram. I am not able to figure out what is needed
You can try:
import matplotlib.pyplot as plt
plt.bar(x=df.index.values, height=df.missing_values.values)
If you ever need to transform the index in a ordinary column, you can use df.reset_index(inplace=True)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.