﻿1
00:00:00,360 --> 00:00:10,030
‫Now let's see how the import data from a CSP file order text file endure workspace.

2
00:00:10,220 --> 00:00:16,420
‫I have to file with me one is a text file called Product 30.

3
00:00:17,070 --> 00:00:24,850
‫And the other one is a CSP file customer Dorsey we file Wendy text file.

4
00:00:25,270 --> 00:00:28,150
‫We can see it contains data of product.

5
00:00:28,150 --> 00:00:34,510
‫It has four columns and all the data in this file is separated by tabs.

6
00:00:34,570 --> 00:00:41,320
‫So if you move from product I need to category there is a tab in between two that is why this is called

7
00:00:41,650 --> 00:00:50,080
‫tab separated file text file and the delimiter for this file will be a tab delimited is the symbol which

8
00:00:50,080 --> 00:00:54,320
‫is segregating one column of the data from another column of the data.

9
00:00:55,600 --> 00:01:03,940
‫Similarly I have a CSP file also as we stand to a comma separated values so the data in this file will

10
00:01:03,940 --> 00:01:05,570
‫be separated with commas.

11
00:01:05,800 --> 00:01:12,730
‫If I open it in notepad we can see the comma after customer data come after customer name and so on.

12
00:01:13,180 --> 00:01:19,090
‫So I want to import these two details of customers and product into my workspace.

13
00:01:19,250 --> 00:01:20,720
‫Let us see how to do that.

14
00:01:20,830 --> 00:01:24,690
‫We will write the variable name which is product get

15
00:01:28,540 --> 00:01:36,750
‫read or table that could start so within double quotation marks.

16
00:01:36,760 --> 00:01:44,160
‫We need to give the file location so we will copy the location of this file from here.

17
00:01:44,680 --> 00:01:50,530
‫Go and pasted and we need to change these back structures into forward slashes

18
00:01:56,190 --> 00:02:01,940
‫and after this we need to mention the name of the file with this product or BSD with a capital B.

19
00:02:01,960 --> 00:02:04,690
‫Remember to put capital B since inside this case to

20
00:02:07,960 --> 00:02:14,740
‫after this we will mention whether our data has header or not so we'll write header is equal to true.

21
00:02:14,950 --> 00:02:23,380
‫Since this data has headers by that I mean that the column names are labeled after this.

22
00:02:23,380 --> 00:02:27,700
‫We will add these separator to separator is given by ACP.

23
00:02:27,700 --> 00:02:28,870
‫This is the delimiter

24
00:02:31,530 --> 00:02:37,510
‫and in our case deliver that for the text file was Tab 2 or tab.

25
00:02:37,510 --> 00:02:43,460
‫We use this escape connector and then the D escape is backslash then D.

26
00:02:43,510 --> 00:02:51,850
‫So this command means that we have data in product not the active file which is placed at this location.

27
00:02:51,850 --> 00:03:02,910
‫It has headers and the data is separated with tabs will close this packet and then this combine

28
00:03:06,440 --> 00:03:11,680
‫so you can see product is now in the workspace.

29
00:03:11,830 --> 00:03:16,960
‫It has all the variables and it has eighteen hundred sixty two observations.

30
00:03:17,140 --> 00:03:28,220
‫You can look at the structure of this data using SDR so we write SDR and within bracket we date product

31
00:03:33,400 --> 00:03:34,180
‫into blender.

32
00:03:35,550 --> 00:03:42,900
‫So product is a data frame it has eighteen hundred sixty two observations of four variables default

33
00:03:42,920 --> 00:03:50,030
‫variables that product daily category subcategory and product name.

34
00:03:50,060 --> 00:03:54,020
‫These are some of the initial values for this particular variable

35
00:03:57,520 --> 00:04:01,150
‫so now let us see how to import data from a CSP file

36
00:04:04,500 --> 00:04:05,240
‫to do this.

37
00:04:05,250 --> 00:04:08,300
‫We will rate customer.

38
00:04:08,580 --> 00:04:09,840
‫This is the name of the variable

39
00:04:14,220 --> 00:04:15,790
‫read dot CSC.

40
00:04:16,120 --> 00:04:21,950
‫Instead of read or table or C as we rewrite the DOT CSP.

41
00:04:22,330 --> 00:04:27,270
‫Then we give the file location which is same as the previous one.

42
00:04:27,330 --> 00:04:28,540
‫So we'll just copy paste

43
00:04:31,580 --> 00:04:32,940
‫instead of product daylight.

44
00:04:33,010 --> 00:04:33,490
‫Customer

45
00:04:35,950 --> 00:04:36,790
‫NTSB

46
00:04:39,790 --> 00:04:42,310
‫this file also has headers so hey that is equal to true

47
00:04:52,070 --> 00:04:56,340
‫and displayed it is and the separate is default comma.

48
00:04:56,450 --> 00:05:02,840
‫What I see is we file so we'll closely bracket here and we'll run this command.

49
00:05:03,050 --> 00:05:05,120
‫You can see customer is also a part of the workspace.

50
00:05:05,120 --> 00:05:16,640
‫Now customer has nine variables and 793 observations to look at this data we like customer and press

51
00:05:16,640 --> 00:05:26,010
‫control and you can see this is the data that we have.

52
00:05:26,030 --> 00:05:33,410
‫This is the first column customarily then customer name segment age country city.

53
00:05:33,480 --> 00:05:40,630
‫If you scroll down you can see the other columns also it is not giving us all the observations the other

54
00:05:40,630 --> 00:05:48,070
‫nations are limited to one hundred eleven only to look at all the observations will rate view and within

55
00:05:48,070 --> 00:05:50,640
‫brackets is right.

56
00:05:50,680 --> 00:05:51,190
‫Very well.

57
00:05:52,120 --> 00:06:00,370
‫Remember the real view is also capital.

58
00:06:00,590 --> 00:06:05,100
‫Now you can look at the whole dataset.

59
00:06:05,730 --> 00:06:14,450
‫If you go down you have only seven entity observations.

60
00:06:14,630 --> 00:06:23,420
‫So this is all we import data from a text file or a CSP file it is a very commonly used practice we

61
00:06:23,420 --> 00:06:32,140
‫often get data saved as a CSP file for basic operations you can use this yes we file in Excel also do

62
00:06:32,140 --> 00:06:33,740
‫some basic operations on it.

63
00:06:33,820 --> 00:06:39,610
‫Well while you're collecting data you can collect the data and work on it in Excel.

64
00:06:39,880 --> 00:06:47,500
‫Once you are ready with data to convert into a CSP file and then upload it in to are to do for the data

65
00:06:47,680 --> 00:06:48,280
‫analysis.

