mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-11-24 12:31:11 +00:00
15 lines
307 B
Python
15 lines
307 B
Python
from scipy.io.arff import loadarff
|
|
import pandas as pd
|
|
|
|
|
|
def arff_to_csv(data, out_file_name):
|
|
|
|
df = pd.DataFrame(loadarff(data)[0])
|
|
df.to_csv(out_file_name, index=False)
|
|
|
|
|
|
def arff_to_excel(data, out_file_name):
|
|
|
|
df = pd.DataFrame(loadarff(data)[0])
|
|
df.to_excel(out_file_name, index=False)
|