I'm trying to get the values in the 'Output' column split into separate rows:
| Category | Output |
|---|---|
| Car | Doc, writeback |
| Car | Trace, dataview |
This needs to be:
| Category | Output |
|---|---|
| Car | Doc |
| Car | Trace |
| Car | writeback |
| Car | dataview |
I've tried:
new_df = auto_test_file.DataFrame(auto_test_file.Output.str.split('|').tolist(), index=auto_test_file.Region).stack()
but this gives the error:
AttributeError: 'DataFrame' object has no attribute 'DataFrame'