Closed psychemedia closed 10 years ago
do you have some examples?
How about this?
import pandas as pd
#Set up a dummy dataframe
courseData= { 'courseCode': ['TM351','TU100','M269'],
'points':[30,60,30],
'level':['3','1','2']
}
course_df=pd.DataFrame( courseData )
from pandasql import sqldf
pysqldf = lambda q: sqldf(q, globals())
q='''
SELECT * FROM course_df;
'''
pysqldf(q)
which returns:
index courseCode level points
0 0 TM351 3 30
1 1 TU100 1 60
2 2 M269 2 30
fixed in 42949a9ce7e0b384b1fd9b146e78ae70841a5986
If I try to select all columns from a dataframe with SELECT *, the dataframe I get in return includes a new, explicitly labelled, index column?