#๐ Pandas set index
12 messages ยท Page 1 of 1 (latest)
@quick iris
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
this is the code btw
i think that's literally a dict in the dataframe?
What does it show if you print(df.columns)?
!d pandas.json_normalize
pandas.json_normalize(data, record_path=None, meta=None, meta_prefix=None, record_prefix=None, errors='raise', sep='.', max_level=None)```
Normalize semi-structured JSON data into a flat table.
you need to normalise it flat table first if you want it to be the index, using this โ๏ธ
would I need to normalise all data? or just ts_events?
you need to normalise the column that contains the dict, not ts_events, the whole point is that ts_events is not yet a column but a key inside a dict in some unknown column which you haven't shown us, hope that makes sense
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.