SQL to Pandas Translation

I’m experienced in working with SQL for data wrangling and analysis, but have recently started using the Python Pandas library for similar tasks. The thing I really like about Pandas is the ability to (combined with matplotlib) to plot/visualize the data once it’s been successfully curated. Coming from the SQL background, I’ve been approaching problems thinking in terms of SQL. So I’m documenting here some translations between SQL and Pandas’ queries. I’ll try to keep updating this as I continue to use Pandas.

select x from data where y = 'z'
 data.x[data['y'] == 'z']

select x from data where y like 'z'

select x from data where y <= n
 data.x[data['y'] <= n]