-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docs & tests for Table.set_format #457
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! Just a few comments
datascience/tables.py
Outdated
@@ -3052,7 +3219,6 @@ def draw_hist(values_dict): | |||
#There's a grouping in place but we're only plotting one column's values | |||
label_not_grouped = [l for l in self.labels if l != group][0] | |||
axis.set_xlabel(label_not_grouped + x_unit, fontsize=16) | |||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo?
@@ -514,7 +514,174 @@ def last(self, label): | |||
############ | |||
|
|||
def set_format(self, column_or_columns, formatter): | |||
"""Set the format of a column.""" | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add an example of one of the built-in formatter classes near the top of this docstring? Most of the users of our library, I image, would be using these quite frequently.
7138790
to
ffca115
Compare
I've made the first example use the builtin CurrencyFormatter and also made the custom formatter examples more relatable since the builtin CurrencyFormatter would not be able to handle these cases (since it always prepends the symbol). Also fixed the typo. |
ffca115
to
b33c1e5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work - thanks for making this documentation so detailed!
This is a partial fix for Add documentation as it adds documentation for Table.set_format.