‫Welcome back, students, and in this lecture, we are going to talk about how to improve data in our
‫so specifically, we are going to talk how to import three of the most used formats of the data to our
‫sources, say, three files, which are easiest to import to our Excel files, files and text text files.
‫So let's get started.
‫The first thing to do is to actually to set the directory where your data is.
‫And this is what we are doing with said to video function you are familiar already with.
‫So let's run this code and after I run this code, I can actually input my data.
‫The easiest way to input my data and my data is here.
‫It's an Excel file, a very simple one, having thirty three rows and two columns showing the number
‫of people and their average training in the gym time per week.
‫So this is our data and I have just duplicated it in three format, which is GSV Excel.
‫And Texte, just for your just for purpose of training.
‫So the easiest way would be just to read in CSFI file to specify that the header is text.
‫So are basically then I would know that the first row is actually text.
‫Let's execute this piece of code, and with this one we have read in our data had shows us the first
‫rows on a preview of our data.
‫Let's put it this way and summary function summarized statistics of our data.
‫So this was a pretty simple example, but sometimes our data comes in a format not that nicely structured
‫as here.
‫So you if in case your data is not separated by columns but separated by commas or semi columns, then
‫you could there is an option to specify this in arguments here.
‫I have just give you provided a piece of code for the case.
‫If you have a different separation, not a tap, but commas or semicolon, then you basically have to
‫just specify the arguments in that.
‫It seems to be a function.
‫Then next example is how to read in the text file and we do it with a function called Read Table, a
‫table data.
‫And here, I mean, the example is exemplary.
‫Data is the same.
‫I just copy paste it into the text file and we do it also with a specified header as text in case you
‫need more arguments for the function to have different separate separator.
‫You can always look at the arguments that are possible to specify in this function.
‫So let's run this piece of code and we say that we are very successful in reading it.
‫Also text file into our.
‫By the way, you can always see your data here, so this example one, if you click on it, then the
‫data appears in a separate tab and you can also view it directly in our.
‫Now, let's read in Excel data, in order to do this, we need a new package which is called Read Excel.
‫So in case you haven't installed it, please, on an this line and install this package.
‫Since I did install it, I just going to read in this package and basically here is a function which
‫we need.
‫It's called Read Excel.
‫And here don't specify any arguments.
‫But similarly to the previous examples, you can look up a dysfunction and see what the arguments are.
‫The and depending on your data, it might be useful to basically to specify some argument.
‫So the result is the same.
‫So in such a way, we have very fast get an overview how to retain the data interacts into our studio.