Python handles csv file problems

you need to use python to process csv files, but there are very few materials on the web to process csv data into object arry,. Is it not handled this way, or are there other methods

Jun.03,2021

see if this helps?
https://cuiqingcai.com/5571.html


consider using pandas to read your csv, and convert it in different ways according to your needs. The first is array , and the second is similar to json

.
import pandas as pd

-sharp  
df = pd.read_csv(<>)
-sharp arraykey
df_array = df.values
-sharp 
df_dict = df.to_dict()
-sharp 
df_dict_array = df.to_dict.values()
Menu