fixing the data as soon as it' captured is nice in perfect world sadlya data scientist doesn' always have say in the data collection and simply telling the it department to fix certain things may not make it so if you can' correct the data at the sourceyou'll need to handle it inside your code data manipulation doesn' end with correcting mistakesyou still need to combine your incoming data as final remarkalways keep copy of your original data (if possiblesometimes you start cleaning data but you'll make mistakesimpute variables in the wrong waydelete outliers that had interesting additional informationor alter data as the result of an initial misinterpretation if you keep copy you get to try again for "flowing datathat' manipulated at the time of arrivalthis isn' always possible and you'll have accepted period of tweaking before you get to use the data you are capturing one of the more difficult things isn' the data cleansing of individual data sets howeverit' combining different sources into whole that makes more sense combining data from different data sources your data comes from several different placesand in this substep we focus on integrating these different sources data varies in sizetypeand structureranging from databases and excel files to text documents we focus on data in table structures in this for the sake of brevity it' easy to fill entire books on this topic aloneand we choose to focus on the data science process instead of presenting scenarios for every type of data but keep in mind that other types of data sources existsuch as key-value storesdocument storesand so onwhich we'll handle in more appropriate places in the book the different ways of combining data you can perform two operations to combine information from different data sets the first operation is joiningenriching an observation from one table with information from another table the second operation is appending or stackingadding the observations of one table to those of another table when you combine datayou have the option to create new physical table or virtual table by creating view the advantage of view is that it doesn' consume more disk space let' elaborate bit on these methods joining tables joining tables allows you to combine the information of one observation found in one table with the information that you find in another table the focus is on enriching single observation let' say that the first table contains information about the purchases of customer and the other table contains information about the region where your customer lives joining the tables allows you to combine the information so that you can use it for your modelas shown in figure to join tablesyou use variables that represent the same object in both tablessuch as datea country nameor social security number these common fields are known as keys when these keys also uniquely define the records in the table they