Create several tables with different names from a macro

0

Hi, I'm new using python, I'm trying to read several csv files and create a table in python for each of them. I already managed to import them but I do not know how to make the name of each table change, here's the code:

import os
import glob
import pandas as pd
import numpy as np

tickers = ['AGRO','ALUA']

for stock in tickers:
    filename = "C:/Users/arianna/Documents/Arianna/Maestria/Finanzas/Tesis/Final/1-Info Paises/1.America - Copy/Argetina/2-Precio/%s_precio.csv"%stock

#aca falla no quiere leer la variable macro %stock
%stock=pd.read_csv(filename, sep=",", dtype={"a":np.datetime64}, header=1,skiprows=None)
    
asked by Arianna Merida 04.11.2018 в 21:43
source

0 answers