Simply show how to use python Medium pandas Library creation 、 Read 、 modify CSV Data files
import numpy as np
import pandas as pd
# -----create an initial numpy array----- #
data = np.zeros((8,4))
# print(data.dtype)
# print(type(data))
# print(data.shape)
# -----from array to dataframe----- #
df = pd.DataFrame(data)
# print(type(df))
# print(df.shape)
# print(df)
# -----edit columns and index----- #
df.columns = ['A', 'B', 'C', 'D']
df.index = range(data.shape[0])
df.info()
# -----save dataframe as csv----- #
csv_save_path='./data_.csv'
df.to_csv(csv_save_path, sep=',', index