Operations with petl: Basic Data Transformations
Petl 1.6
| Beginner
- 11 videos | 1h 34m 28s
- Includes Assessment
- Earns a Badge
Software development often requires manipulation of data that has been extracted from different data sources to make it compatible with the user's specifications and requirements. petl's data transformation features can help achieve this. In this course, you'll investigate fundamental data transformations that can be performed using the petl library. You'll demonstrate how to load data into a petl table, filter columns, and combine multiple tables using different forms of concatenation operations. Next, you'll outline how to convert data in a petl table into a form that is compatible with your requirements. This includes transforming strings to numbers, applying calculations to numeric fields, and replacing specific values in the table. Lastly, you'll explore ways to filter content in petl tables using the facet() function and different select operations.
WHAT YOU WILL LEARN
-
Discover the key concepts covered in this courseCreate a petl data table from python-based data structures, such as numpy arrays and pandas dataframesPerform slicing, dicing, and merging operations on petl data tablesCombine data from multiple tables into one tableInsert as well as edit rows and columns in petl data tablesPerform various replace and type change operations on data
-
Find and replace specific values in a fieldImplement sql-like query operations on petl data tablesFilter data based on single as well as a combination of conditionsUse petl's facet() function to define filters for specific fields in a tableSummarize the key concepts covered in this course
IN THIS COURSE
-
2m 35sIn this video, you’ll learn more about the course and the instructor. In this course, you’ll learn about fundamental data transformations which can be performed using the PETL library. You’ll learn how to load data into a PETL table and filter columns. You’ll also learn how data from multiple tables can be combined using different concatenation operations. You’ll also learn to convert data in a PETL table into a form compatible with your requirements. FREE ACCESS
-
9m 27sIn this video, you’ll learn more about petl's interoperability with some important Python libraries, notably NumPy and pandas. You’ll start by importing NumPy as np, petl as etl, and pandas as pd. You’ll discover NumPy is the go-to Python library for working with n-dimensional arrays. Onscreen, you’ll see this type of array. You’ll see the basic abstraction in NumPy is the ndarray and you’ll use the np.array function in order to construct an ndarray. FREE ACCESS
-
9m 6sIn this video, you’ll watch a demo. In this demo, you’ll continue to learn about Transform Utilities available in petl. You’ll see import statement onscreen, pandas as pd and petl as etl. Next, you’ll start by initializing a list of lists called employees_finance_info. You’ll see this list of lists is delimited by two opening and two closing square brackets. You’ll learn the first list enclosed within the outer list is the header row. FREE ACCESS
-
8m 42sIn this video, you’ll watch a demo. This demo will pick up where you left off in the last one. This time, you'll learn how to combine data from multiple tables in petl. You’ll look at how to use etl. cat to work with verticals. You’ll first look at the content of your list of lists. You’ll follow along with the directions onscreen to complete this demo. FREE ACCESS
-
10m 11sIn this video, you’ll watch a demo. In this demo, you’ll perform various DDL operations from the world of SQL. Specifically, you’ll see how to add columns to an existing petl table. You’ll take a look at the data within the variable employees_analytics_info. This is a list of lists with four columns, 'name', 'designation', emp_id', and 'rating'. Next, you’ll invoke the etl.addfield function. You’ll also examine the petl table, looking at the columns. FREE ACCESS
-
12m 17sIn this video, you’ll watch a demo. In this demo, you’ll look at the data contained in the petl tables. You’ll also experiment with various methods that allow you to change values contained within the petl table. You’ll need to import two statements. Once you have those, you’ll initialize the data. This is in the form of a list of lists. You’ll see the header has intentionally been omitted. FREE ACCESS
-
9m 32sIn this video, you’ll watch a demo. In this demo, you’ll see how etl.convert can be used with lambdas along with a special keyword argument called where. You’ll see the where argument has clear similarities to the where clause in SQL. It can be used with both select and update statements. You’ll first create a new column called room_type. Then, you’ll populate that column with a list. FREE ACCESS
-
11m 15sIn this video, you’ll watch a demo. In this demo, you’ll use the APIs available in petl to effectively run select queries on petl tables. You’ll start by importing the required libraries. Next, you’ll read in our input data into a pandas DataFrame. You’ll make use of pd.read_csv, and specify the file you want to read in. This is a csv file. FREE ACCESS
-
9m 10sIn this video, you’ll watch a demo. In this demo, you’ll learn about selectcontains. Onscreen, you’ll see the etl.selectcontains function. That's the first input argument, the second input argument is a column called a 'neighborhood_group', and the third is a specific value called 'Manhattan'. The difference between selecteq and selectcontains, lies in the nature of the comparison: selectcontains is going to look for the substring Manhattan in the value of a 'neighborhood_group' for each row. FREE ACCESS
-
10m 38sIn this video, you’ll watch a demo. In this demo, you’ll continue to work with the data from the last demo. Onscreen you’ll see the simple fragments of code we performed to read the data into a Pandas DataFrame. Then, you’ll convert that Pandas DataFrame into a petl table. Next, you’ll complete other operations. FREE ACCESS
-
1m 35sIn this video, you’ll summarize what you’ve learned in this course. You learned the transform step in the Extract Transform Load Pipeline. You also learned fundamental data transformations that can be performed using the PETL library. You also learned how data from multiple tables can be combined using different Concatenation operations to combine data both horizontally as well as vertically. You also learned to convert the data in a petl table into another form. FREE ACCESS
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.
Digital badges are yours to keep, forever.