1
I am trying to read Anatel’s datasets file, but it is divided by state. Is there any way I can read all the files in the folder at once? I did reading file by file and joining all in one.
#Importando os datasets do ano de 2016
df_ac2016 = pd.read_csv('dataset/Solicitações Registradas na Anatel (2016-AC).csv', sep=';', encoding='latin-1')
df_al2016 = pd.read_csv('dataset/Solicitações Registradas na Anatel (2016-AL).csv', sep=';',encoding='latin-1')
df_am2016 = pd.read_csv('dataset/Solicitações Registradas na Anatel (2016-AM).csv', sep=';',encoding='latin-1')
df_ap2016 = pd.read_csv('dataset/Solicitações Registradas na Anatel (2016-AP).csv', sep=';',encoding='latin-1')
df_ba2016 = pd.read_csv('dataset/Solicitações Registradas na Anatel (2016-BA).csv', sep=';',encoding='latin-1')
df_ce2016 = pd.read_csv('dataset/Solicitações Registradas na Anatel (2016-CE).csv', sep=';',encoding='latin-1')
df_df2016 = pd.read_csv('dataset/Solicitações Registradas na Anatel (2016-DF).csv', sep=';',encoding='latin-1')
df_es2016 = pd.read_csv('dataset/Solicitações Registradas na Anatel (2016-ES).csv', sep=';',encoding='latin-1')
I got it here, but now I’ll see if I can convert it to dataframe. He returned a list and when I try to pass the conversation he only converts the indices.
– Rafaelcvo
@Rafaelm. I added an option to concatenate the data. See if it helps you
– Terry
I used it here and it worked. I was trying to force the conversion before concatenating.
– Rafaelcvo