I'm new in python and now I'm trying to do a chart plot in matplotlib from a file with a lot of data that have one number column and a text column in this format:
34 Louis Mathews Sullivan
58 Frederick Milton2
1 Mario Cruz Muñoz
I would like to have a plot like this
and like this:
Considering that is not data frame, the column of name give me some problems. Can you help me and support about this? Thanks
Let's try reading this to a dataframe, split it and plot:
Output (for the sample data):
If you want horizontal bar, use
plot.barh
instead:And you get: