pandas.DataFrame.to_pickle Pickle can serialize any python objects. Everything in Python is an object so technically many python components can be pickled. The concept is we can save any object and data objects in python into pickle format, of which we can load later, much like csv. This is a very important data science tool, and is especially useful for working with pandas in machine learning and deep learning.
Turn a variable called my_dataframe, my variable name for a Pandas Dataframe into a pickle file with extension pkl.
my_dataframe.to_pickle(file_name)
This tutorial introduces the idea of pickling of Python objections, Python Dictionaries for better loading speed, optimization and note pickling is used in Machine Learning as well.
Unlike other serialization libraries, pickle can serialize (flatten or "preserve") most python objects. It is also different from JSON, which is human readable. Pickle is binary, hence it is fast to load and small to store.
Check out the official documentation for this detail. Source 1
Source 1 https://docs.python.org/3/library/pickle.html
Your byte size news and commentary from Silicon Valley the land of startup vanities, coding, learn-to-code and unicorn billionaire stories.
Ad
Subscribe to:
Post Comments (Atom)
React UI, UI UX, Reactstrap React Bootstrap
React UI MATERIAL Install yarn add @material-ui/icons Reactstrap FORMS. Controlled Forms. Uncontrolled Forms. Columns, grid
-
This review is updated continuously throughout the program. Yay I just joined the Udacity Nanodegree for Digital Marketing! I am such an Uda...
-
Can hack schools solve Silicon Valley's talent crunch? The truth about coding bootcamps and the students left behind http://t.co/xXNfqN...
-
The bogus request from P2PU to hunt for HTML tags in real life has yielded a lot of good thoughts. My first impression was that this is stup...
No comments:
Post a Comment