Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

csv file -> binary file #2

Open
mengzhibin opened this issue Feb 4, 2021 · 1 comment
Open

csv file -> binary file #2

mengzhibin opened this issue Feb 4, 2021 · 1 comment

Comments

@mengzhibin
Copy link

could you help tell how to convert csv file to binary file?
is there any python script or c++?

@Ravitejarao333
Copy link

Ravitejarao333 commented Jan 24, 2024

Here's a Python script using the pandas library to convert a CSV file to a binary file :
csv to binary

code :
**import pandas as pd

def csv_to_binary(csv_file, binary_file):
df = pd.read_csv(csv_file)
df.to_pickle(binary_file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants