Request to Bring Back DataFrame ouput for 'etable()'
MaxTemmerman opened this issue · 4 comments
Hi,
This is my first time opening an issue on Github. Please excuse me if my issue isn't well structured.
After updating from pyfixest v-0.22.0 to the latest release (0.24.2) I noticed that etable(models, type="df") no longer returns a DataFrame object and instead only returns a pandas Styler object. While the Styler object has its benefits , especially for formatting and layout, it lacks some of the flexibility that a regular DataFrame provides.
In particular, with a DataFrame output, I was able to:
-
Add custom rows with additional statistics. Although I realize this can now be done using the custom_stats option within etable() it allowed for more flexibility on the users' end.
-
Concatenate different etable results at a later stage in my workflow.
-
Easily export the table results to CSV format, which is important for some projects that require open-source data storage methods like CSV over Excel.
Request: Would it be possible to restore the option to get the results of etable() as a DataFrame (either alongside the Styler object or as an alternative option)? This would allow for greater flexibility in post-processing and exporting the results.
To keep my current project running without major changes, I’ve reverted to pyfixest v0.22.0, which still returns the etable(type="df) results as a DataFrame.
Thanks for you consideration and maintaining this amazing package ! :)
Hi Max @MaxTemmerman, thanks for raising this!
Sorry that we got rid of the df method - it was not on my radar that anyone would use it to store results! I suppose that you prefer etable over the tidy method because it also includes information on fixed effects, r squared etc? Coincidentally, @dsliwka and I chatted today about bringing back the "unstyled df", so that is what we'll do. =)
Thanks for the kind words, and excellent first issue! Thanks!
Hi Max (@MaxTemmerman), could you try out etable with output= "df" from this PR #614 and tell us if the output is as you'd like?
Hi Alexander (@s3alfisc),
Thank you for your response and for reintroducing this functionality! Although I'm no longer working on this project, I’ve shared this thread with a colleague who is still actively involved.
Thank Max @MaxTemmerman! New version with df output for etable is now merged to master.