Special Note:This assignment isrun by SQLite rather than MySQL. So you might want to watch some slight syntax differences between two SQL languages.For example: in MySQL, we use "insert ignore into...", while in SQLite we use "insert or ignore into". Plus, before using some fancy MySQL functions, i.e. STR_TO_DATE in MySQL, try searching if they are necessary and also working in SQLlite as well. In fact, this assignment does not requireany advanced functions to finish.
Exhibits and Curators
In this assignment, you willcreate a database with two tablesexhibitsandcuratorsthat would have the following information:
Note: The capitalized words in the parentheses are the data types of the columns, NOT the names of the column.
. table name: exhibits id (INT) name (VARCHAR) start_date (DATE) end_date (DATE) curator_id (INT) [FK to curator.id] 3 Free The Fishes 2018-01-01 2018-06-30 5 17 Space, What Lies Above 2018-02-01 2018-05-30 11 23 Bears Bears Bears 2018-02-14 2018-02-24 5 46 Humans? Aliens? 2019-03-14 2019-10-21 11 . table name: curators id (INT) name (VARCHAR) bio (TEXT) 5 Rebecca Votea Esteemed naturalist 11 Simon Strauss Space man 71 Rick Sanchez GrandfatherResult Grid name Humans? Aliens? Bears Bears Bears Space, What Lies Above Free The Fishes\fjupyter pandasprocessing (autosaved) Control Panel File Edit View Insert Cell Kernel Widgets Help Not Connected |Not Trusted |Python 3 [3.6] $3 B+ 2 2 6 + + HC Code In [1]: import pandas as pd import numpy as np import datetime def transform( ) : # ## ### YOUR CODE HERE # ## return df. to_cav('output1.cav") In [2]: # Read-only transform( ) df = pd. read_csv( 'output1 . csv' , index_col = 0) df out [2] : Created Closed Date Date Borough Descriptor Complaint Type Agency Longitude Latitude Status processing_time start_time_window 2016-01- 2016-01- 01 01 BROOKLYN Loud Music/Party Noise - 00:00:09 01:57:32 Street/Sidewalk NYPD -73.982840 40.701823 Closed 01:57:23.000000000 0 days 2016-01- 2016-01- 01 01 03:12:53 BRONX Loud Music/Party Noise - 0 days Residential NYPD -73.836111 40.875565 Closed 0 00:00:40 03:12:13.000000000 2016-01- 2016-01- 2 01 21 00:01:09 09:20:55 BRONX NO LIGHTING ELECTRIC HPD -73.878885 40.884277 Closed op:19:46.000000000 20 days O 3 2016-01- 2016-01- Unspecified Loud Music/Party Noise - Residential NYPD NaN NaN Closed 2 0 day 00:02:59 23:35:50 23:32:51.00000000 2016-01- 2016-01- 01 BRONX ENTIRE BUILDING HEAT/HOT 7 days 00:03:03 01:13:00 WATER HPD -73.896507 40.857841 Closed 01:09:57.000000000 2016-01- 2016-01- 01 01 QUEENS Loud Music/Party Noise - 0 day Residential NYPD -73.886210 40.745728 Closed 03-21-43 0noononno In [3]: ### ### AUTOGRADER TEST - DO NOT REMOVE ### Length of output. OK. 10/10 points In [4]: sample