-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Initial draft: from_dummies #41902
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
Merged
+651
−1
Merged
Initial draft: from_dummies #41902
Changes from all commits
Commits
Show all changes
121 commits
Select commit
Hold shift + click to select a range
f3e6afe
Initial draft: from_dummies
pckSF c7c5588
Clean-up tests with fixtures
pckSF d06540f
Make tests more elegant
pckSF 1fa4e8a
Remove variable argument
pckSF c7f8ec8
Remove dummy_na argument
pckSF 3cc98ca
Remove loop over df rows
pckSF 0e131c6
Add fillna and basic tests
pckSF 9f74dc7
Fix testnames regarding nan and unassigned
pckSF 442b340
Remove fillna
pckSF 38cf04d
Add from_dummies docstring
pckSF 8eccfab
Add docstring to _from_dummies_1d
pckSF fd027c5
Fix column behaviour
pckSF 106ff3c
Update handling of unassigned rows
pckSF 2019228
Start user_guide entry
pckSF be39c05
Draft reshaping user_guide entry
pckSF d406227
Fix: remove temp workspace separation
pckSF 61a25e0
Add raise ValueError on unassigned values
pckSF 1d104f8
Merge updates from upstream/master
pckSF 5bcfbb4
Fix mypy issues
pckSF ca6200e
Fix docstring multi-line statements
pckSF bf17cdb
Add TypeError for wrong dropped_first type
pckSF 92b5dae
Add tests for incomplete seperators
pckSF c2cd747
Add tests for complex prefix separators
pckSF dc50464
Remove magic handling of non-dummy columns
pckSF 4d9cfd0
Removed to_series argument
pckSF 82d6743
Renamed column argument to subset
pckSF 153202d
Renamed tests to reflect the removal of to_series
pckSF d3dd9f7
Fix input data NA value test to account for subset
pckSF e6ec175
Renamed argument prefix_sep to just sep
pckSF ee6025d
Improve docstring for sep
pckSF 4e741c8
Update user guide entry
pckSF 1b4a8e9
Fix wrong variable name in docstring: d to df
pckSF 90177be
Fix mypy issues
pckSF d58c668
Merge remote-tracking branch 'upstream/master' into add-from_dummies
pckSF 46457fa
Fix post upstream merge mypy issues
pckSF 131f42b
Fix errors in user guide
pckSF 1af65ac
Merge 'upstream/master' into add-from_dummies
pckSF 6dacf53
Allow hashable categories
pckSF 61edd30
Add None category to mixed_cats_basic test
pckSF 04f360c
Add index to argument types and fix resulting mypy issues
pckSF 7ff2f3b
Merge remote-tracking branch 'upstream/master' into add-from_dummies
pckSF 56ea182
Remove list from dropped_first args
pckSF 39a0199
Remove list from sep args
pckSF e05fe3f
Remove default category name
pckSF 23f6c07
Adapt docstring examples to removal of list from sep and dropped_firs…
pckSF 7190879
Update docstring: Remove default category name
pckSF 012a1dd
Updaterst: Add missing word
pckSF 52ed909
Add from_dummies to reshaping api
pckSF d8e4743
Merge remote-tracking branch 'upstream/master' into add-from_dummies
pckSF 0cf35d8
Add: allow dropped_first to be any hashable type
pckSF b9303bc
Add: Temporary mypy fix
pckSF 3207534
Merge remote-tracking branch 'upstream/master' into add-from_dummies
pckSF 8089fe5
Merge remote-tracking branch 'upstream/master' into add-from_dummies
pckSF 55ad274
Add from_dummies to pandas __init__ file
pckSF 1b17815
Add from_dummies to test_api tests
pckSF 00c7b05
Fix docstring examples
pckSF 07ba536
Adapt documentation to account for removal of list arguments
pckSF bbe41d0
Fix wrong parenthesis in docstring
pckSF 329394b
Fix docstring example expected return
pckSF b83ac6a
Simplify from_dummies
pckSF 1f5e1dc
Update user guide entry
pckSF 8a3421b
Change arg dropped_first to implied_value
pckSF 16cdaa0
Add dosctring note and test for boolean dummy values
pckSF 174df1f
Fix docstring typo
pckSF e45d3f8
Change arg implied_value to implied_category
pckSF e83faed
Fix docstring format mistakes
pckSF 1e12e6a
Replace argmax/min with idxmax/min
pckSF 24e9899
Reduce complexity by using defaultdict
pckSF c8e7a7d
Merge remote-tracking branch 'upstream/master' into add-from_dummies
pckSF 0ac8fff
Ignore dependency based mypy errors
pckSF 6af6cad
Merge remote-tracking branch 'upstream/master' into add-from_dummies
pckSF 54fdcbd
Add Raises section to docstring
pckSF ced3ed0
Change implied_category to base_category
pckSF 6db7744
Add proper reference to get_dummies in docstring
pckSF c84d973
Remove unnecessary copy of input data
pckSF 842d335
Merge upstream master
pckSF 8f91012
Fix docstring section order
pckSF 84d5bd8
Remove redundant f-strings
pckSF fd0f985
Add check for 'data' type
pckSF 6230d0f
Add TypeError for wrong data type to docstring
pckSF 84a60f7
Add roundtrip tests get_dummies from_dummies
pckSF c78ef2a
Merge remote-tracking branch 'upstream/main' into add-from_dummies
pckSF 52a9dea
Move from_dummies to encoding.py
pckSF bc658ba
Fix from_dummies import in test file
pckSF 9fbca72
Update userguide versionadded to 1.5
pckSF 2581fc9
Draft whats-new entry
pckSF 85a0ed8
Change code-block to ipython
pckSF 5b74039
Improve test names and organization
pckSF 015ee94
Show DataFrames used in docstring examples
pckSF 66c0292
Merge remote-tracking branch 'upstream/main' into add-from_dummies
pckSF 30b8ff1
Merge remote-tracking branch 'upstream/main' into add-from_dummies
pckSF b261656
Merge remote-tracking branch 'upstream/main' into add-from_dummies
pckSF 555825b
Merge remote-tracking branch 'upstream/main' into add-from_dummies
pckSF 9d6e571
Merge from umstream/main
pckSF 9f1bb8e
Merge remote-tracking branch 'upstream/main' into add-from_dummies
pckSF dc52985
Merge remote-tracking branch 'upstream/main' into add-from_dummies
pckSF e7d6828
Merge remote-tracking branch 'upstream/main' into add-from_dummies
pckSF ae9f3d2
Fix whatsnew entry typo
pckSF a59ed4e
Fix whats-new
pckSF 66c7a64
Merge remote-tracking branch 'upstream/main' into add-from_dummies
pckSF 76221f8
Merge remote-tracking branch 'upstream/main' into add-from_dummies
pckSF 7fa66b3
Change base_category to default_category
pckSF 536f9c5
Merge updates from upstream/main
pckSF 530889e
Add double ticks to render code in docstring
pckSF 6536c65
Fix docstring typos and alignments
pckSF 1272a23
Inline the check_len check for the default_vategory
pckSF fd3b115
Fix mypy issues by removing fixed ignores
pckSF bd5a118
Fix error encountered during docstring parsing
pckSF f7d08d0
Fix redundant backticks following :func:
pckSF c32e514
Add space before colon for numpydoc
pckSF 0fda02f
Added pd.Categorical to See Also
pckSF 62b09ae
Add version added
pckSF 1dcdd9a
Add from_dummies to get_dummies see also
pckSF 3c00690
Fix see also missing period error
pckSF 4425b4a
Fix See Also of get_dummies
pckSF dc144f7
Merge remote-tracking branch 'upstream/main' into add-from_dummies
pckSF 15503b0
Fix docs compiler error
pckSF 61a348b
Merge from master
pckSF f06a45c
Fix default_category=0 bug and add corresponding tests
pckSF f3a0f83
Merge remote-tracking branch 'upstream/main' into add-from_dummies
pckSF 23c133f
Use .loc[:, prefix_slice] instead of [prefix_slice]
pckSF File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ Data manipulations | |
merge_asof | ||
concat | ||
get_dummies | ||
from_dummies | ||
factorize | ||
unique | ||
wide_to_long | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.