Metadata-Version: 2.1
Name: numpickle
Version: 0.1.2.post5
Summary: Save and load numeric pandas data frames as numpy array and pickle their row and column names and types info for performance reasons.
Home-page: https://github.com/gwangjinkim/numpickle
License: MIT
Keywords: Excel,Pandas,data frame,I/O
Author: Gwang-Jin Kim
Author-email: gwang.jin.kim.phd@gmail.com
Maintainer: Gwang-Jin Kim
Maintainer-email: gwang.jin.kim.phd@gmail.com
Requires-Python: >=3.7.1,<4.0.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: numpy (>=1.19.2,<2.0.0)
Requires-Dist: pandas (>=1.2.4,<2.0.0)
Project-URL: Repository, https://github.com/gwangjinkim/numpickle
Description-Content-Type: text/markdown

# Install

```pip install numpickle```

## Usage

```
import pandas as pd
import numpickle as npl


# create example data frame with non-numeric and numeric columns
df = pd.DataFrame([[1, 2,'a'], [3, 4, 'b']])
df.columns = ["A", "B", "C"]
df.index = ["row1", "row2"]

df
#       A  B  C
# row1  1  2  a
# row2  3  4  b

df.dtypes
# A     int64
# B     int64
# C    object
# dtype: object




# save data frame as numpy array and pickle row and column names
# into helper pickle file "/home/user/test.npy.pckl"
npl.save_numpickle(df, "/home/user/test.npy")

# load the saved data
df_ = npl.load_numpickle("/home/user/test.npy")

df_
#       A  B  C
# row1  1  2  a
# row2  3  4  b


df_.dtypes
# A     int64
# B     int64
# C    object
# dtype: object

all(df == df_)
# True

```



