Git Product home page Git Product logo

Comments (5)

lithomas1 avatar lithomas1 commented on June 29, 2024

Just to clarify, are you looking for this feature in cudf itself, or did you need this feature using something like cudf.pandas?
(also, since you're planning on reading pickles, do you also want support for to_pickle?)

If you're just looking to pickle cudf objects, you can do this manually using the pickle module, e.g.

import cudf
import pickle
a = cudf.DataFrame({"a":[1,2,3]})
# Write to pickle
pickle.dump(a, open("cdf.pkl", "wb"))
# Read from pickle
pickled_a = pickle.load(open("cdf.pkl", "rb"))

# Confirming they are equal
cudf.testing.testing.assert_frame_equal(a, pickled_a)

from cudf.

weidinger-c avatar weidinger-c commented on June 29, 2024

Thanks for the reply, I know that there is a dedicated pickle module.
I just wanted to compare my code without any code changes as I thought that cuDF has feature parity with pandas df.

from cudf.

lithomas1 avatar lithomas1 commented on June 29, 2024

Thanks for the reply, I know that there is a dedicated pickle module. I just wanted to compare my code without any code changes as I thought that cuDF has feature parity with pandas df.

Thanks for clarifying.

You might want to try cudf.pandas if you'd like to use cudf with zero code change from pandas.
(Although there is also an issue with read_pickle there #15459)

from cudf.

wence- avatar wence- commented on June 29, 2024

I just wanted to compare my code without any code changes as I thought that cuDF has feature parity with pandas df.

Mostly, but not completely. Other than the API compatibility is there some aspect of pandas.read_pickle that is not supported by plain pickle.load?

from cudf.

weidinger-c avatar weidinger-c commented on June 29, 2024

I just wanted to compare my code without any code changes as I thought that cuDF has feature parity with pandas df.

Mostly, but not completely. Other than the API compatibility is there some aspect of pandas.read_pickle that is not supported by plain pickle.load?

No, at least nothing I am aware. As I said, I just wanted to try out and test my lib with cudf with the least possible effort to see if it brings some performance gains.

from cudf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.