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

docs: more concise docstrings(#2068) #2117

Merged
merged 2 commits into from
Mar 2, 2025

Conversation

skritsotalakis
Copy link
Contributor

  • expr_dt
  • expr_cat
  • dataframe
  • dtypes
  • exp_str - fix slice-
  • expr_list
  • expr_name

What type of PR is this? (check all applicable)

  • πŸ’Ύ Refactor
  • ✨ Feature
  • πŸ› Bug Fix
  • πŸ”§ Optimization
  • πŸ“ Documentation
  • βœ… Test
  • 🐳 Other

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

could you please double-check for accidental duplication like the one I highlighted?

also, the data in many of these expr_dt examples can probably be shortened so it doesn't span as many lines, but that's ok as a follow-up

Comment on lines 557 to 558
Examples:
Examples:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to have this twice

... datetime(2024, 10, 13, 5, 30, 14),
... datetime(2065, 1, 1, 10, 20, 30),
... ]
... }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarcoGorelli

Changing the column name to "a" and inserting 2 datatimes instead of 3 doesn't improve much in long datetime entries. Introducing from datetime import datatime as dtime reduces the output to 3 lines (bellow example) but i m not sure this is desirable.
>>> from datetime import datetime as dtime
>>> df_native = pa.table(
... {"a": [dtime(1978, 1, 1, 1, 1, 1), dtime(2065, 1, 1, 10, 20, 30)]}
... )

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure thanks, don't worry about it then

if you just check of repetitions like Examples twice or accidental whitespace then we can get this in πŸ‘

  * expr_dt
  * expr_cat
  * dataframe
  * dtypes
  * exp_str - fix slice-
  * expr_list
  * expr_name
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarcoGorelli MarcoGorelli merged commit 9173b79 into narwhals-dev:main Mar 2, 2025
28 checks passed
@skritsotalakis skritsotalakis deleted the docstrings-concise branch March 2, 2025 16:39
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.

2 participants