Operations with petl: Advanced Extractions & Transformations
Petl 1.6
| Intermediate
- 10 videos | 1h 15m 43s
- Includes Assessment
- Earns a Badge
Petl facilitates and streamlines tasks related to data extraction and manipulation, often required by software developers to make data fit for actionable business intelligence (BI). In this course, you'll work with complex operations in petl and outline how to extract data from a source and convert it to a format that complies with your requirements. You'll begin by investigating the use of regular expressions to analyze, search, and extract specific rows and columns in a petl table. You'll then create transform functions and apply them to your data. These include operations on numeric as well as string fields. Moving on, you'll implement sort operations to organize data in a petl table and arrange it in a sequence that suits your purposes. Finally, you'll investigate how to perform joins and set operations on data tables and meaningfully reduce the data in them using aggregation functions.
WHAT YOU WILL LEARN
-
Discover the key concepts covered in this courseAccess regular expression patterns in data tablesImplement regular expression searches on petl data tablesImplement split operations on data stored within petl data tablesUnpack nested fields when creating data tables
-
Use mapping to perform various operations on columns and fields in data tablesTransform data by rows using rowmap() and rowmapmany() functionsPerform sort operations on data stored within a data tableImplement sql-like joins on data from multiple petl tablesSummarize the key concepts covered in this course
IN THIS COURSE
-
2m 50sIn this video, you’ll learn more about your instructor and this course. In this course, you’ll learn more about the complex operations in PETL when it comes to extracting data from a source and converting it to a format that complies with your requirements. You’ll start by delving into the use of regular expressions to analyze, search for, and extract specific rows and columns in your petl table, based on the patterns you define. FREE ACCESS
-
10m 6sIn this video, you’ll learn more about ETL operations. You’ll learn that working with unstructured data and regular expressions can be a powerful addition to your toolkit. You’ll learn that operations like searching for a pattern, performing search and replace operations, getting a sense of the formats of values in a field are all important in an ETL context. You’ll learn how petl supports these. FREE ACCESS
-
4m 44sIn this video, you’ll watch a demo. In this demo, you’ll start where you left off at the end of the last one. You’ll find the rows that contain a pattern. You’ll return to etl.search, with a different variant. Here, you’ll search for a pattern in a column. You’ll pass in not only the petl table, but also the name of the column, which is 'nameSuffix'. Next, you’ll examine the return values. FREE ACCESS
-
9m 29sIn this video, you’ll watch a demo. In this demo, you’ll learn operations where you’ll modify data based on patterns present within it. You’ll learn that search and replace is closely related to etl.search. Next, you’ll move to the etl.sub function, which is a search and replace operation. Onscreen, you’ll see etl.sub. We've passed in our petl table called basketball_data. Then, you’ll see there’s a column name. Next, you’ll see the search and replace parameters. FREE ACCESS
-
5m 14sIn this video, you’ll watch a demo. In this demo, you’ll work with some specialized ETL functions. Specifically, you’ll learn to unpack a nested field. Onscreen, you’ll see a dataset. This is a list of lists called names_of_players. You’ll notice that this dataset’s second column is in the form of a nested field. Each individual player's name is mentioned as an array, and that array consists of the first name, middle name and last name. FREE ACCESS
-
9m 23sIn this video, you’ll watch a demo. In this demo, you’ll continue with the theme of transforming data using petl. You’ll learn about radical transformations that perform complete makeovers of the data. The output will look very different from the input. Onscreen you’ll see the required import statements. These include two familiar ones: pandas as pd and petl as etl and a new one. From collections, you’ll import OrderedDict. This is a special Python dictionary. FREE ACCESS
-
10m 51sIn this video, you’ll watch a demo. In this demo, you’ll focus on row-oriented transformations rather than column-oriented transformations. You’ll continue using the same dataset you used in the previous demo. Onscreen, you’ll see a function called rowmapper. It will be applied to the input data. The rowmapper function will operate on the input data, one row at a time. Now, you’ll learn what the rowmapper function does. FREE ACCESS
-
10m 7sIn this video, you’ll watch a demo. In this demo, you’ll learn about sorting operations. You’ll use the same dataset from the previous demo. This dataset is in a petl table read in from a pandas DataFrame. You’ll start with a simple sorting operation, etl.sort. It takes a petl table in and performs a sort across the columns in the input table. You don’t need to specify a subset of the columns to sort. FREE ACCESS
-
10m 58sIn this video, you’ll watch a demo. In this demo, we will turn our attention to joins. You’ll need the import of petl as etl. Onscreen now is a list of lists, called trees_legal_status. It consists of data with three columns: 'Number', 'TreeID' and 'LegalStatus'. You’ll add a second list of lists. This one is called street_trees, and this one has a slightly different set of columns: 'Number', 'TreeID', 'Address', 'SiteOrder', and 'Caretaker'. FREE ACCESS
-
2m 3sIn this video, you’ll summarize what you learned in the course. In this course, you learned the use of regular expressions to analyze, search for, and extract specific rows and columns in your petl table based on the patterns you defined. You then learned to transform and sort data. You also learned to implement sort operations to order data in a format you need. Finally, you implemented join operations in petl. 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.