I have a weird array and I can't quite manage to transform it into datasets (a matrix) with the help of pandas
[{'session_id': 'fc4867a5-cff2-4210-9ddf-9e5db35187ec', 'filters': {'color': 'red'}, 'duration': 25, 'attributes': [{'Occasion': 'Casual'}, {'Ideal For': 'Women'}, {'Heel Height': '0 inch'}], 'product': 'V4STYLES Loafers', 'price': 1049}, {'session_id': 'fc4867a5-cff2-4210-9ddf-9e5db35187ec', 'filters': {'color': 'blue'}, 'duration': 25, 'attributes': [{'Occasion': 'Casual'}, {'Ideal For': 'Women'}, {'Heel Height': '0 inch'}], 'product': 'V4STYLES Loafers', 'price': 1049}, {'session_id': 'fc4867a5-cff2-4210-9ddf-9e5db35187ec', 'filters': {'color': 'blue'}, 'duration': 25, 'attributes': [{'Occasion': 'Casual'}, {'Ideal For': 'Women'}, {'Heel Height': '0 inch'}], 'product': 'V4STYLES Loafers', 'price': 1049}, {'session_id': 'fc4867a5-cff2-4210-9ddf-9e5db35187ec', 'filters': {'color': 'blue'}, 'duration': 25, 'attributes': [{'Occasion': 'Casual'}, {'Ideal For': 'Women'}, {'Heel Height': '0 inch'}], 'product': 'V4STYLES Loafers', 'price': 1049}, {'session_id': 'fc4867a5-cff2-4210-9ddf-9e5db35187ec', 'filters': {'color': 'blue'}, 'duration': 25, 'attributes': [{'Occasion': 'Casual, Ethnic, Formal, Party'}, {'Ideal For': 'Women'}, {'Weight': '200 g (per single Shoe) - Weight of the product may vary depending on size.'}], 'product': 'dilli bazaaar Bellies, Corporate Casuals, Casuals', 'price': 349}, {'session_id': 'fc4867a5-cff2-4210-9ddf-9e5db35187ec', 'filters': {'color': 'blue'}, 'duration': 25, 'attributes': [{'Ideal For': "Women's"}, {'Occasion': 'Casual, Party'}, {'Pattern': 'Self Design'}], 'product': "F&S Casual, Party Short Sleeve Self Design Women's Top", 'price': 421}, {'session_id': 'fc4867a5-cff2-4210-9ddf-9e5db35187ec', 'filters': {'color': 'blue'}, 'duration': 25, 'attributes': [{'Ideal For': "Women's"}, {'Occasion': 'Casual, Party'}, {'Pattern': 'Self Design'}], 'product': "F&S Casual, Party Short Sleeve Self Design Women's Top", 'price': 421}, {'session_id': 'fc4867a5-cff2-4210-9ddf-9e5db35187ec', 'filters': {'color': 'green'}, 'duration': 25, 'attributes': [{'Base Material': 'Brass'}, {'Brand': 'Vendee Fashion'}, {'Model Number': 'VD8636'}], 'product': 'Vendee Fashion Brass Jewel Set', 'price': 829}, {'session_id': 'fc4867a5-cff2-4210-9ddf-9e5db35187ec', 'filters': {'color': 'green'}, 'duration': 25, 'attributes': [{'Base Material': 'Brass'}, {'Brand': 'Vendee Fashion'}, {'Model Number': 'VD8636'}], 'product': 'Vendee Fashion Brass Jewel Set', 'price': 829}, {'session_id': 'fc4867a5-cff2-4210-9ddf-9e5db35187ec', 'filters': {'color': 'green'}, 'duration': 25, 'attributes': [{'Base Material': 'Brass'}, {'Brand': 'Vendee Fashion'}, {'Model Number': 'VD8636'}], 'product': 'Vendee Fashion Brass Jewel Set', 'price': 829}, {'session_id': 'fc4867a5-cff2-4210-9ddf-9e5db35187ec', 'filters': {'color': 'green'}, 'duration': 25, 'attributes': [{'Base Material': 'Brass'}, {'Brand': 'Vendee Fashion'}, {'Model Number': 'VD8636'}], 'product': 'Vendee Fashion Brass Jewel Set', 'price': 829}, {'session_id': 'fc4867a5-cff2-4210-9ddf-9e5db35187ec', 'filters': {'color': 'green'}, 'duration': 25, 'attributes': [{'Occasion': 'Casual'}, {'Ideal For': 'Women'}, {'Tip Shape': 'Round'}], 'product': 'Willy Winkies Black Boots', 'price': 999}, {'session_id': 'fc4867a5-cff2-4210-9ddf-9e5db35187ec', 'filters': {'color': 'green'}, 'duration': 25, 'attributes': [{'Occasion': 'Casual'}, {'Ideal For': 'Women'}, {'Tip Shape': 'Round'}], 'product': 'Willy Winkies Black Boots', 'price': 999}, {'session_id': 'fc4867a5-cff2-4210-9ddf-9e5db35187ec', 'filters': {'color': 'green'}, 'duration': 25, 'attributes': [{'Occasion': 'Casual'}, {'Ideal For': 'Women'}, {'Tip Shape': 'Round'}], 'product': 'Willy Winkies Black Boots', 'price': 999}, {'session_id': 'fc4867a5-cff2-4210-9ddf-9e5db35187ec', 'filters': {'color': 'green'}, 'duration': 25, 'attributes': [{'Ideal For': 'Women'}, {'Occasion': 'Casual'}, {'Weight': '500.00000000 g (per single Shoe) - Weight of the product may vary depending on size.'}], 'product': 'CatBird Boots', 'price': 999}, {'session_id': 'fc4867a5-cff2-4210-9ddf-9e5db35187ec', 'filters': {'color': 'green'}, 'duration': 25, 'attributes': [{'Ideal For': 'Women'}, {'Occasion': 'Casual'}, {'Weight': '500.00000000 g (per single Shoe) - Weight of the product may vary depending on size.'}], 'product': 'CatBird Boots', 'price': 999}, {'session_id': 'fc4867a5-cff2-4210-9ddf-9e5db35187ec', 'filters': {'color': 'green'}, 'duration': 25, 'attributes': [{'Ideal For': 'Women'}, {'Occasion': 'Casual'}, {'Weight': '500.00000000 g (per single Shoe) - Weight of the product may vary depending on size.'}], 'product': 'CatBird Boots', 'price': 999}]
I would like to group this object in a matrix and group by sessionId.
The other data in json, such as attributes or filters, I can leave them as json and calculate how many times they appear, but I would like to transform this large object