considering the database image attached below, suppose we have to plot x = TIME; y = Value; the plot should place countries in the graph for particular quarters and values. So there are there columns values interacting with each other. We are trying to represent countries in the axes of TIME and Value. I am trying to find an alternative without using one-hot encoding.
When trying to plot the data using this code:
x = x.sort_values(by = ['TIME'])
x[['TIME', 'Value']].plot(x="TIME", y = "Value", kind="bar")
The quarters are getting repeated in the x-axis. Can you explain how can we deal with such scenarios. the sample of dataset
One of the best solutions will be to convert the values using One-Hot encoding and then plot them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With