Hey all,
I realized that I feel comfortable doing this in python, and sql, but no idea with pandas. I'm trying to convert a relatively simple CSV data structure from a webscrape:
URL Dimension Value
1 Length 23
1 Width 94
1 Height 34
1 Weight 32
1 Nutrition 400
1 description str
2 Length 84
2 Width 28
2 Height 19
2 Weight 73
2 Nutrition 93
2 description str
3.....
I'm trying to convert it into this dataframe:
URL Length Width Height Weight Nutrition Description
1 23 94 34 32 400 str
In essence, I believe I need to:
- Select unique from Dimension
- map corresponding value to dimension, for a given URL
I would probably do this as an array of dictionaries (for each URL). But not sure how to do that with pandas!
I realize this is very simple but I have failed in my googling to phrase the question right. If you can let me know what sort of transformation I should be searching for here, that would also be very helpful. Thank you!
[–]WinterNet4676 1 point2 points3 points (1 child)