I'm trying to get a list of movies from Steven Spielberg, but for some reason the query in Pandas returns an empty DataFrame, although I know for sure that the table contains Steven Spielberg movies.
Before writing code in Pandas, I imported everything:
from pandasql import sqldf
pysqldf = lambda q: sqldf(q, globals())
import pandas as pd
My SQL query:
SELECT movie, rating_ball, director
FROM bf
WHERE director = 'Стивен Спилберг'
movies = pysqldf(query)
print(movies)
And the output is like:
Empty DataFrame
Columns: [movie, rating_ball, director]
Index: []
But when I delete 'WHERE' clause, it works. I don't know why. I tried to change 'Стивен Спилберг' on "Стивен Спилберг", but it still doesn't work.