Hi, welcome back.
In this lecture, we will write a query that will return a part of airlines database, then we will
copy this part and save the output data as easy as we file as the following copy of in brackets, select
passenger name and date board between two brackets, day and date as day.
And they'd bought between two brackets months and date as months on select city from airports where
airports could equal f the departure airport close bracket as departures city comma between two brackets
also select city from areas where airports could equal f dot arrival.
Airport close brackets as a rival city comma.
Some between two brackets total amount close the two brackets and as sales from bookings table B join
tickets table as D on the book reference equality dot book reference.
Join ticket flights stf on t dot ticket number equal t f the ticket number.
Join Flight F Onchi Ashdod Flight ID Equal F dot flight ID Rokeby Column one and column two and column
three and column for and column five.
Order by column three and column six.
Close the bracket of Cobbe comment then two between two parentheses specified directory that we will
save our filing then delimiter between two parentheses.
The diameter is a spacer or the separator as common as the kind of the file a C as we file then headers
and semicolon.
Then we will run the query to create our new CSS.
We file as the following at will takes one minute and 23 seconds for the new C as we file saved to the
directory we have specified.
So we will check for this directory and see if our file is successfully created and exists, so we will
open the CSP file to check the data inside it and the following.
After opening the sea as we file, we find that the letter of departures and arrivals need to be cleaned.
So we will extract English names from JSON data as the following, as the following.
So select city hyphen double zero then and between two parentheses for English, but small, not capital.
And the same we will do for the arrival city.
And we will run the query, so we will get to see as we file cleaned and the data of the departure and
arrival city.
Now we will open the file again to check if the departure city and arrival city have been cleaned or
not.
As you see, we will run now see and again and again to applaud the sea as we file again and read that
by using Python Banda's module as a phone or package.
So import pendas as we will run the first cell, then upload our file, says we file the following.
Then after uploading the file, we will use Bizim Banda's package to read this file at the following
data Equal Bed Dot read see as V underscores the ASV between two brackets and between two parentheses
the name of our five.
We will take it from the Bush admin and paste it between the two parentheses then runs itself.
But S.V. and small case.
After running the second cell and the third cell we will type data data dot head bison Banda's function.
To read the first five records from our file, as you see.
Then if we want to read more than that, we will type the same function, then between the two brackets,
we will specify the number of rules we want to return or retrieve.
For example, we want to return the first 20 rows.
We will typed one in between the two brackets.
But there is a problem and ordering of the days of the month is in our case file.
So we will return to busy admin to correct this issue as the following.
We will order our data by the of the problems in the second columns in the second column.
Then we will delete the last as we file.
Then we will run our query again as the following.
So we will create our correct CSP file again by running the correct query again at the following.
Then after that, we will delete the formal file from our little notebook, then upload the correct
file again.
After applauding the is vital to the job with a notebook, we will import pandas again and we will rename
our data to date Efraim D.F. Equal Banda's did not read.
See as we underscores ASV between two brackets and two parentheses the name of C as wi fi then runs
a second cell, then in the cell the cell we will write D.F. Dot.
Had to read the first five records from our is V file.
Then if we want to read the first one records from our CSP file, we will tie the F dot head between
two brackets to any.
And so on for the first 50 rows at the following.
Get ready for the next section as we will deep dive in that analysis process and apply that to the airline's
data board as we file using Banda's functions and methods.
So see you there.
You have not had between two brackets, 50 and round the cell and so on at this point, we reached the
end of this lecture.
Hope you enjoyed this lecture.
And to get all of that, thank you for being here and see you next lecture.
Thanks for watching.
See you next with you.