I'm relatively new to pandas and numpy
what I'm trying to achieve is:
Following there is a sample dataframe:
name message occurred
0 meta-tag1 InvalidPlan 1
1 meta-tag1 Maximun number of attempts at planning surpassed 276
2 meta-tag1 Rescheduling worker 275
3 meta-tag2 InvalidPlan 18
4 meta-tag3 Maximun number of attempts at planning surpassed 22
I can't seem to find a solution that allows me to produce the result I want.
At first I used np.unique to build 2 lists containing the unique meta-tags and unique error
Then generating a list of dataframes filtered for meta-tag, then generating an array from each sub-dataframe containing only the occurences per error and I tried feeding to a pyplot feeding it the list of arrays with the occurrencies, the unique error-messages as columns and unique meta-tags as index, but I couldn't get it working and I am pretty sure it's the wrong approach at it.
I'm pretty sure it can be achieved only by manipulating the dataframe in the correct way, which it's pretty hard for me at my current level, any suggestion is really really welcome.
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.