-
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
issue 163: Updated documentation of remaining methods for creation of table #467
Conversation
Added an example for the from_records method
Added example for read_table
Added example for from_df for creation of table
Added example for from_array method for creation of a table
datascience/tables.py
Outdated
@@ -115,11 +129,52 @@ def from_columns_dict(cls, columns): | |||
|
|||
@classmethod | |||
def read_table(cls, filepath_or_buffer, *args, **vargs): | |||
"""Read a table from a file or web address. | |||
"""Read a table from a file or web address.""" |
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.
What's the purpose/effect of changing this line?
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.
There's no effect. Misinterpreted a previous PR, my bad!
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.
I've fixed the extra quotes in the last commit.
Removed unnecessary triple quotes
Updated docstrings to fix build failures
Updated docstring examples
Updated docstring examples for methods of Table creation
Updated docstring examples for from_array method
Updated output of from_array method
datascience/tables.py
Outdated
... {'column1':'data2','column2':2}, | ||
... {'column1':'data3','column2':3} | ||
... ]) | ||
>>> print(t) |
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.
Can we please change this to >>> t
rather than print(t)
? This way it stays consistent with all the other method's docstrings
datascience/tables.py
Outdated
... columns = ['column1','column2','column3'] | ||
... ) | ||
|
||
>>> print(sample_DF) |
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.
Same as above comment - please remove the call to print
function :)
datascience/tables.py
Outdated
|
||
>>> t = Table().from_df(sample_DF) | ||
|
||
>>> print(t) |
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.
Same as above comment - please remove the call to print
function :)
datascience/tables.py
Outdated
|
||
>>> t = Table().from_array(arr) | ||
|
||
>>> print(t) |
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.
Same as above comment - please remove the call to print
function :)
Thanks for this contribution! Please see my comments for additional required changes :) Also, please try to resolve the merge conflict as well |
Removed print() commands to maintain consistency
I have introduced the changes as requested :) |
Thanks for the changes! |
Added examples for methods: from_records(), read_table(), from_df(), from_array()
[ ] Wrote test for feature
[ ] Added changes to CHANGELOG.md
[ ] Bumped version number (delete if unneeded)
Changes proposed: