-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix consumption of CPU-backed interchange protocol dataframes (#11392)
Closes #11245. This PR fixes a bug in our code that consumes a protocol DataFrame that is backed by CPU memory. This enables using the `from_dataframe()` function to construct DataFrames from other libraries: ```python In [12]: pdf = pd.DataFrame({'x': [1, 2, 3], 'y': [1.0, 2.0, np.nan], 'z': ['a', 'b', 'c']}) In [13]: vdf = vaex.from_dict({'x': [1, 2, 3], 'y': [1.0, 2.0, np.nan]}) In [14]: cudf.from_dataframe(pdf, allow_copy=True) Out[14]: x y z 0 1 1.0 a 1 2 2.0 b 2 3 NaN c In [15]: cudf.from_dataframe(vdf, allow_copy=True) Out[15]: x y 0 1 1.0 1 2 2.0 2 3 NaN ``` Authors: - Ashwin Srinath (https://github.com/shwina) - GALI PREM SAGAR (https://github.com/galipremsagar) - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Bradley Dice (https://github.com/bdice) - Lawrence Mitchell (https://github.com/wence-) URL: #11392
- Loading branch information
Showing
3 changed files
with
211 additions
and
112 deletions.
There are no files selected for viewing
This file contains 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 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.