Closed discdiver closed 3 years ago
Interesting idea. I wonder how hard it is to infer/check column naming style based on the other columns. Do you have any thoughts on that aspect? I like the idea of making this part of style=True because I think consistency is good and using styling to modify might be more expected.
I don't think I would infer. I would probably just leave it at changing snake case to title with spaces. Maybe do the same for dashes.
You could do with with regex, or chained str.replaces like this:
df.columns.str.replace('_', ' ').str.replace('-', ' ').str.title()
Great package! Thank you for it.
stb.freq()
returns a DataFrame with Count, Percent, Cumulative Count, and Cumulative Percent columns in title case. The original column that is also in the resulting DataFrame is often in snake case.The user can manually use .rename to make the formatting match, but sidetable is all about nicely displayed summary tables. Is it worth having a separate argument to
stb.freq()
to make the column name formatting match? Or is it worth including it as part of(style=True)
?