Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ENH Introduces set_output API for pandas output #23734
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
ENH Introduces set_output API for pandas output #23734
Changes from all commits
e1ea0a9
07078a1
1faf347
9f9680a
a6a4b59
4ae72c5
beca084
021d36c
de0db34
63c4204
ee4cdff
9d318b1
609f4f0
64c761a
471e2d5
63c2011
89a854e
20fed9e
91e2448
d63f059
32d9252
126a9aa
0d02e50
fb0abaa
1c5c2ef
e4a663f
c8667b9
390e257
19b6032
0d2610a
531c9c7
321ede0
865edf5
110e50d
1c658ed
5ae531f
4c7fefa
4f8c2ac
50fd9c1
0f63fa2
c9fc072
09d2359
c59d800
128ee66
3477d51
f94870e
9cbb47c
cf0c916
94c4ff5
4e56880
980caf3
9888bdd
2b238aa
2db0dd4
77511b5
903ad04
4d7f594
26853ab
7f13efb
f64b2f5
96ae074
99f9497
2fc486d
fe87f71
cca5548
54964dd
3f56922
88e17ff
072b1a3
78f4a8b
598a94f
08e01d0
0009dc3
244c002
4b1f1e5
c33a307
51fc045
fad1fa5
c8bb076
d25ba8b
01771ae
1421e8a
24c3fc1
b87ad84
5313958
48add35
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 we use a more speaking name than
"default"
as default value? I know, it's written in SLEP 018, but something like"numpy"
or"array-like"
would better describe this option, IMHO.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 option use to be
"numpy"
, but it was inconsistent with transformers that can output sparse data. I was also thinking about third party transformers that already output dataframes where a "numpy" default would be strange.I can get behind
"array-like"
. The only concern I have is how sparse data is a weird "array-like", becauseasarray
on a sparse matrix returns an object dtype: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.
Looking at our glossary entry for "array-like", we exclude "sparse matrix" from "array-like". In that case, "array-like" would not be a good default, because it does not cover sparse matrices.
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.
Do you have a proposal. Naming the default "default" just seems wrong to me. What if we change it in the future?
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.
The semantics for "default" is "the transformer does anything it wants". Here are some options:
None
"undefined"
"unmodified"
"unchanged"
I am in favor of
None
. I think it's the most pythonic way to say "use the default".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'm fine with
None
. What do others think?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 we use a more speaking name than
"default"
as default value? I know, it's written in SLEP 018, but something like"numpy"
or"array-like"
would better describe this option, IMHO.