Question regarding rearranging dataframe

I have been thinking about this question for a long time, and I’ve finally decided to ask for help… I want to compare the values of Male and Female wages. I’ve created 2 dataframes and attempted to compare the values directly… but this doesn’t work very well. What I’m hoping to do now is somehow keep all the values in 1 dataframe, split the column for male/ female, and have the corresponding wage values show up in two new columns ‘Male_wages’ and ‘Female_wages’. I want these values side by side so I can perform calculations for easily. I’m hoping for some ideas of how to do this or something similar as I’ve spent far too much time on this problem and nothing new is occurring to me. Thanks for any help you can offer! :slight_smile: ! Picture is in the comments below.

Alternatively, I could try to analyse with two seperate data frames. I’m not sure what is best.

Doesn’t make sense. If you have a person which is male, then the female_wage would be empty.

You would have to perform some sort of aggregation, perhaps by country (and/or year).

The problem I see here is that the wages are specified in different currencies. You would have to convert all the wages into a single currency (USD?), otherwise comparisons will be pretty much pointless.
It seems that the Currency column contains not only the currency used, but also some additional info. This would have to be taken care of as well.

To show the differences you could use grouped bar plot (if you wish to show the differences grouped by country) or just line plot (if grouped by year). There are many other plots you could use, but the aggregation is crucial for this sort of task.

1 Like