Closed tharwan closed 3 years ago
Thanks for the report @tharwan. My best guess upon a quick glance is that the issue here is related to the line
df.index = df["Beschreibung"]
(see #34364 for something similar). The same workaround should hopefully work here (using set_index
instead of directly assigning). Since the index is immutable, direct assignment with a mutable object should generally be avoided (but clearly we should handle it more gracefully than a segfault).
@tharwan going to close in favor of #34364, but please reopen if you think it is a different issue.
[x ] I have checked that this issue has not already been reported.
[ x] I have confirmed this bug exists on the latest version of pandas.
[ ] (optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
First of all, I know that the example is not a proper minimal snippet. I also can not provide the excel files in question. However I have no idea how to debug this issue any further.
If I run the script above with python -X faulthandler I get:
From what I can deduce there is something wrong with the template_df DataFrame. I was trying to generate an equivivalent copy of it without copying the memory so I ran it through
This does indeed seem to help. However by accident I discovered just doing
also fixes it. As if to_dict() would somehow alter the DataFrame?
So I might be completely on the wrong track. Any help on how to drill down on this would be appreciated.
Expected Output
No segfault :-)
Output of
pd.show_versions()