Я хочу использовать переменную Python Identity для курса в запросе pandasql, но она не работает.
Вот мой код:
Course_Identity='Mathematics'
query=("""SELECT user_id, course_id, count( DISTINCT event_type) as Sequential from big_data where event_type like '%sequential+block%' and course_id = Course_Identity group by user_id, course_id """)
Sequential = pd.DataFrame(ps.sqldf(q0_dseq, locals()))
Sequential.head()