Skip to content
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

Merged
merged 1 commit into from
Sep 25, 2020

Conversation

hmstepanek
Copy link
Contributor

@hmstepanek hmstepanek commented Sep 13, 2020

  • Add docs & tests for Table.set_format

This is a partial fix for Add documentation as it adds documentation for Table.set_format.

@coveralls
Copy link

coveralls commented Sep 13, 2020

Coverage Status

Coverage remained the same at 88.255% when pulling b33c1e5 on hmstepanek:add-set-format-docs into 5ff8bbd on data-8:master.

Copy link
Member

@adnanhemani adnanhemani left a 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

@@ -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:
Copy link
Member

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."""
"""
Copy link
Member

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.

@hmstepanek
Copy link
Contributor Author

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.

Copy link
Member

@adnanhemani adnanhemani left a 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!

@adnanhemani adnanhemani merged commit 97a9cb8 into data-8:master Sep 25, 2020
@hmstepanek hmstepanek deleted the add-set-format-docs branch September 26, 2020 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants