xget pandas series/dataframe
Posted: Mon Feb 07, 2022 7:07 am
Hello,
i would like to know if there is any documentation about importing data from python. I am using the code below. My issue is that when I use xget, the data is imported but the dates are not algined with the dates in my EViews workfile. Is there any way to import the data back where EViews can parse the dates/data and do the alignment?
xopen(p)
xrun "import pandas as pd"
xrun "import pyodbc"
xrun "conn = pyodbc.connect(connection string)"
sql_query="insert sql query here"
xrun df=df1 = pd.read_sql(sql_query,conn)
xrun df.set_index("series_value_date", inplace=True)
xget(name=series1,ptype=dataframe) df
i would like to know if there is any documentation about importing data from python. I am using the code below. My issue is that when I use xget, the data is imported but the dates are not algined with the dates in my EViews workfile. Is there any way to import the data back where EViews can parse the dates/data and do the alignment?
xopen(p)
xrun "import pandas as pd"
xrun "import pyodbc"
xrun "conn = pyodbc.connect(connection string)"
sql_query="insert sql query here"
xrun df=df1 = pd.read_sql(sql_query,conn)
xrun df.set_index("series_value_date", inplace=True)
xget(name=series1,ptype=dataframe) df