Operations with petl: Basic Data Transformations

Petl 1.6    |    Beginner
  • 11 videos | 1h 34m 28s
  • Includes Assessment
  • Earns a Badge
Rating 4.0 of 7 users Rating 4.0 of 7 users (7)
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 course
    Create a petl data table from python-based data structures, such as numpy arrays and pandas dataframes
    Perform slicing, dicing, and merging operations on petl data tables
    Combine data from multiple tables into one table
    Insert as well as edit rows and columns in petl data tables
    Perform various replace and type change operations on data
  • Find and replace specific values in a field
    Implement sql-like query operations on petl data tables
    Filter data based on single as well as a combination of conditions
    Use petl's facet() function to define filters for specific fields in a table
    Summarize the key concepts covered in this course

IN THIS COURSE

  • 2m 35s
    In 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 27s
    In 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
  • Locked
    3.  Performing Basic Transformations on Data in petl
    9m 6s
    In 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
  • Locked
    4.  Combining Data from Multiple Tables in petl
    8m 42s
    In 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
  • Locked
    5.  Inserting Rows and Columns in petl Data Tables
    10m 11s
    In 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
  • Locked
    6.  Implementing Replace and Type Change Operations
    12m 17s
    In 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
  • Locked
    7.  Replacing Values in petl Data Tables
    9m 32s
    In 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
  • Locked
    8.  Querying Data in petl Data Tables
    11m 15s
    In 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
  • Locked
    9.  Filtering Data Based on Conditions in petl
    9m 10s
    In 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
  • Locked
    10.  Defining Filters for Specific Fields in petl
    10m 38s
    In 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
  • Locked
    11.  Course Summary
    1m 35s
    In 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.

YOU MIGHT ALSO LIKE

Rating 4.4 of 524 users Rating 4.4 of 524 users (524)
Rating 4.3 of 32 users Rating 4.3 of 32 users (32)
Rating 4.7 of 3 users Rating 4.7 of 3 users (3)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 3.8 of 5 users Rating 3.8 of 5 users (5)
Rating 4.4 of 298 users Rating 4.4 of 298 users (298)
Rating 4.1 of 7 users Rating 4.1 of 7 users (7)