Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

Save pandas dataframe with numpy arrays column

you can pickle the data instead.

df.to_pickle('test.csv')
df = pd.read_pickle('test.csv')

This will ensure that the format remains the same. However, it is not human readable

If human readability is an issue, I would recommend converting it to a json file

df.to_json('abc.json')
df = pd.read_json('abc.json')

Tags:

Python

Pandas

Numpy

Related

Why use `concat` instead of `push` in this instance? XAMPP: your connection is not private NET::ERR_CERT_AUTHORITY_INVALID kotlin: extension methods and null receiver Using new Date() with v-date-picker doesn't work How to make good reproducible Apache Spark examples Importing javascript file for use within vue component Scraping free proxy listing website Error connecting to Azure: Illegal character in password with mongoose 5.0.1 but works in 4.13.9 IE11 CSS alternative to "unset" Get column names with zero variance using dplyr Angular 5 : Allow trailing slash in routes .net core build produces localization folders

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy