Question: Lab NumPy and SQL exercise Try Converting SQL queries to pandas SQLDataScience _ Movies _ 0 1 October 1 , 2 0 2 4 `

Lab NumPy and SQL exercise
Try Converting SQL queries to pandas SQLDataScience_Movies_01
October 1,2024
```
[1]: import pandas as pd
Movie = pd.read_csv('movies.csv')
```
[2]: Movie ['ReleaseDate']= pd.to_datetime(Movie['ReleaseDate'], format='\%d-\%b-\%y') Movie
[2]:
[7614 rows x 15 columns]
```
[3]: # SELECT Title
# FROM Movie
# WHERE Rating ="G"
[4]: # SELECT Title
# FROM Movie
# WHERE ReleaseDate >"2020-01-01"
```
[5]: \# SELECT Title
\# FROM Movie
\# WHERE Rating In ("G","PG")
Movie.query("Rating=='G' or Rating=='PG'")[['Title']]
[5]: Title
0 Superbabies: Baby Geniuses 2
3 From Justin to Kelly
5 Leonard Part 6
6 Son of the Mask
15 Dragonball Evolution
-.
7574
7575
Back to the Future
7577
Cinema Paradiso
The Lion King 7594
7598 Star Wars: Episode V - The Empire Strikes Back
[1398 rows x 1 columns]
[6]: \# SELECT Title
\# FROM Movie
\# WHERE Rating ="PG-13" and ReleaseDate >"2008-01-01"
[7]: \# SELECT Title, ReleaseDate
\# FROM Movie
\# WHERE Budget > Gross
[8]: \# SELECT Title
\# FROM Movie
\# WHERE Budget Gross AND Rating ="G"
[9]: \#SELECT Title, Year, Budget
\# FROM Movie
\# WHERE Budget >300000000
Lab NumPy and SQL exercise Try Converting SQL

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!