‫Now let's see how the import data from a CSP file order text file endure workspace.
‫I have to file with me one is a text file called Product 30.
‫And the other one is a CSP file customer Dorsey we file Wendy text file.
‫We can see it contains data of product.
‫It has four columns and all the data in this file is separated by tabs.
‫So if you move from product I need to category there is a tab in between two that is why this is called
‫tab separated file text file and the delimiter for this file will be a tab delimited is the symbol which
‫is segregating one column of the data from another column of the data.
‫Similarly I have a CSP file also as we stand to a comma separated values so the data in this file will
‫be separated with commas.
‫If I open it in notepad we can see the comma after customer data come after customer name and so on.
‫So I want to import these two details of customers and product into my workspace.
‫Let us see how to do that.
‫We will write the variable name which is product get
‫read or table that could start so within double quotation marks.
‫We need to give the file location so we will copy the location of this file from here.
‫Go and pasted and we need to change these back structures into forward slashes
‫and after this we need to mention the name of the file with this product or BSD with a capital B.
‫Remember to put capital B since inside this case to
‫after this we will mention whether our data has header or not so we'll write header is equal to true.
‫Since this data has headers by that I mean that the column names are labeled after this.
‫We will add these separator to separator is given by ACP.
‫This is the delimiter
‫and in our case deliver that for the text file was Tab 2 or tab.
‫We use this escape connector and then the D escape is backslash then D.
‫So this command means that we have data in product not the active file which is placed at this location.
‫It has headers and the data is separated with tabs will close this packet and then this combine
‫so you can see product is now in the workspace.
‫It has all the variables and it has eighteen hundred sixty two observations.
‫You can look at the structure of this data using SDR so we write SDR and within bracket we date product
‫into blender.
‫So product is a data frame it has eighteen hundred sixty two observations of four variables default
‫variables that product daily category subcategory and product name.
‫These are some of the initial values for this particular variable
‫so now let us see how to import data from a CSP file
‫to do this.
‫We will rate customer.
‫This is the name of the variable
‫read dot CSC.
‫Instead of read or table or C as we rewrite the DOT CSP.
‫Then we give the file location which is same as the previous one.
‫So we'll just copy paste
‫instead of product daylight.
‫Customer
‫NTSB
‫this file also has headers so hey that is equal to true
‫and displayed it is and the separate is default comma.
‫What I see is we file so we'll closely bracket here and we'll run this command.
‫You can see customer is also a part of the workspace.
‫Now customer has nine variables and 793 observations to look at this data we like customer and press
‫control and you can see this is the data that we have.
‫This is the first column customarily then customer name segment age country city.
‫If you scroll down you can see the other columns also it is not giving us all the observations the other
‫nations are limited to one hundred eleven only to look at all the observations will rate view and within
‫brackets is right.
‫Very well.
‫Remember the real view is also capital.
‫Now you can look at the whole dataset.
‫If you go down you have only seven entity observations.
‫So this is all we import data from a text file or a CSP file it is a very commonly used practice we
‫often get data saved as a CSP file for basic operations you can use this yes we file in Excel also do
‫some basic operations on it.
‫Well while you're collecting data you can collect the data and work on it in Excel.
‫Once you are ready with data to convert into a CSP file and then upload it in to are to do for the data
‫analysis.