-
Notifications
You must be signed in to change notification settings - Fork 157
docs: docstring for concat
#808
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
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.
nice one @Sherwin-14 , thanks!
a few requests:
- could we make
data_1
,data_2
please? and thendf_pd_1
,df_pd_2
,df_pl_1
,df_pl_2
? - could you check your statement about
Series
? I don't think we support them
Thanks for the feedback, Marc! The CI tests seem to be failing though and I can't figure it out why, any clues? |
Hey, needed some clarification over this. I have changed both the data's to |
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 the PR. I have only one comment in addition to what Marco already mentioned.
Regarding the test failing, that's because we compare the exposed functions with what we expose in /stable/v1.py
. I think this was not failing before because the docstring was empty. Now it should be added.
Here a hint on how to:
def concat(
items: Iterable[FrameT],
*,
how: Literal["horizontal", "vertical"] = "vertical",
) -> FrameT:
# Same docstring but using
# import narwhals.stable.v1 as nw
# inplace of import narwhals as nw
return _stableify(nw.concat(items, how=how))
│ 5 ┆ 1 │ | ||
│ 2 ┆ 4 │ | ||
└─────┴─────┘ | ||
""" |
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.
Would you mind adding an example for horizontal concat as well?
you can do
|
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 updating!
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 one, thanks @Sherwin-14 !
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.
one more thing (as ci is failing)
can you update the docstring for concat
in narwhals/stable/v1
as well please? it should be the same, but with import narwhals.stable.v1 as nw
instead of import narwhals as nw
Hey I checked the |
Hey did you find some solution for this? the ci is still failing and I didn't find the |
Hey @Sherwin-14 , sorry I missed the first comment among various notifications. I now see the issue, we somehow have the |
thanks for the ping, and sorry for the delay in
so yes, maybe a separate PR to stableify |
No worries. I can do this but what exactly needs to be done here? If you can outline the steps to me it will be a little bit easier for me. |
thanks! you'll need to do something like diff --git a/narwhals/stable/v1.py b/narwhals/stable/v1.py
index 9c7c2d15..d96f0523 100644
--- a/narwhals/stable/v1.py
+++ b/narwhals/stable/v1.py
@@ -37,7 +37,7 @@ from narwhals.expr import Expr as NwExpr
from narwhals.expr import Then as NwThen
from narwhals.expr import When as NwWhen
from narwhals.expr import when as nw_when
-from narwhals.functions import concat
+from narwhals.functions import concat as nw_concat
from narwhals.functions import show_versions
from narwhals.schema import Schema as NwSchema
from narwhals.series import Series as NwSeries
@@ -1668,6 +1668,9 @@ def from_dict(
nw.from_dict(data, schema=schema, native_namespace=native_namespace)
)
+def concat(*args, **kwargs):
+ return _stableify(nw_concat(*args, **kwargs))
+ but instead of |
looks like Francesco's already on it in #869 though ⚡ |
Hey @Sherwin-14 , we just merged a PR that adds |
Thanks a lot. I will do the needful :) |
e1075f5
to
695c510
Compare
695c510
to
334c5a4
Compare
thanks @Sherwin-14 ! i think maybe something went wrong when merging, as docs/api-completeness.md is being shown as modified |
334c5a4
to
e78efd6
Compare
Yeah I fixed that you can take a look at it now :) |
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.
this is really good - thanks @Sherwin-14 , and @FBruzzesi for review!
I wrote the docstring's for concat function. Please have a look into it