Querying a pandas data frame using SQLite, I am wanting to select all rows that have a country cell entry of ''. So no characters in the cell. However, when I run the SQLite query I am getting no rows returned. Still new to Python.
Data frame structure:
- Policy: object
- Country: object
- State: object
Data frame example:
Policy | Country | State |
---|---|---|
1 | US | NY |
2 | CA | |
3 | US | FL |
SQLite select:
sqlcode = '''
Select
[Policy],
[Country],
[State]
From
sqldf
Where
Country = ''
'''
check = psl.sqldf(sqlcode,locals())