Pandas in Python – Common pitfalls and tips

Hi,

This is Jing, a data scientist with great passion for applying data science and big data technology in the industry. Today you are going to learn Pandas with me. I will talk about some common errors and good practice when you are processing data with python.

Here is a list of things we will cover today.

Common pitfalls and errors

  • Key Error
  • Index Error
  • Attribute Error

Best practices and tips

  • Get or set values quickly
  • Leftover DataFrames
  • Set data type for the columns in the dataset
  • Check and know your data before calculation

Before we look at each function, we need to create an example dataset so that you could understand the function better through the examples. And import the pandas library as pd which is a name we will use in the following code. Then follows explanation, examples and exercise of each function listed above.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Hope you find it is helpful for you to learn more about Pandas!

Pandas in Python – Groupby and Categorical data

Hi,

This is Jing, a data scientist with great passion for applying data science and big data technology in the industry. Today you are going to learn Pandas with me. I will talk about how to using Pandas to group your data and work with categorical data when you are processing data with python.

Here is a list of functions we will cover today.

  • DataFrame.groupby ( )
  • Grouped.agg ( )
  • Grouped.filter ( )
  • Pandas.DataFrame.rank ( )
  • Pandas.Series.cat ( )
  • Pandas.getdummies ( )

Before we look at each function, we need to create an example dataset so that you could understand the function better through the examples. And import the pandas library as pd which is a name we will use in the following code. Then follows explanation, examples and exercise of each function listed above.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Hope you find it is helpful for you to learn more about Pandas!

Pandas in Python – Working with datetime data

Hi,

This is Jing, a data scientist with great passion for applying data science and big data technology in the industry. Today you are going to learn Pandas with me. I will talk about how to using Pandas to work with datetime data when you are processing data with python.

Here is a list of commonly used functions in pandas for dealing with datetime data we will cover today.

  • pd.Timestamp ( )
  • pd.Period ( )
  • pd.Timedelta ( )
  • pd.to_datetime ( )

Before we look at each function, we need to create an example dataset so that you could understand the function better through the examples. And import the pandas library as pd which is a name we will use in the following code. Then follows explanation, examples and exercise of each function listed above.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Hope you find it is helpful for you to learn more about Pandas!

Pandas in Python – Working with text data

Hi,

This is Jing, a data scientist with great passion for applying data science and big data technology in the industry. Today you are going to learn Pandas with me. I will talk about how to using Pandas to work with text data when you are processing data with python.

Here is a list of commonly used functions in pandas for processing text data we will cover today.

  • split ( )
  • replace ( )
  • extract ( )
  • getdummies ( )
  • wrap ( )
  • partition ( )
  • swapcase ( )
  • capitalize ( )
  • rfind ( )

Before we look at each function, we need to create an example dataset so that you could understand the function better through the examples. And import the pandas library as pd which is a name we will use in the following code. Then follows explanation, examples and exercise of each function listed above.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Hope you find it is helpful for you to learn more about Pandas!

Pandas in Python – Pivot and unPivot

Hi,

This is Jing, a data scientist with great passion for applying data science and big data technology in the industry. Today you are going to learn Pandas with me. I will talk about how to using Pandas to pivot and unpivot data when you are processing data with python in this blog.

Here is a list of commonly used functions in pandas for pivoting and unpivoting data we will cover today in this blog.

  • pivot_table ( )
  • stack ( )
  • unstack ( )
  • melt ( )

Before we look at each function, we need to create an example dataset so that you could understand the function better through the examples. And import the pandas library as pd which is a name we will use in the following code. Then follows explanation, examples and exercise of each function listed above.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Hope you find it is helpful for you to learn more about Pandas!

Pandas in Python – Merge and reshape data

Hi,

This is Jing, a data scientist with great passion for applying data science and big data technology in the industry. Today you are going to learn Pandas with me. I will talk about how to using Pandas to merge and reshape data when you are processing data with python in this blog.

Here is a list of commonly used functions in pandas for merging and reshaping data we will cover today in this blog.

  • merge ( )
  • join ( )
  • drop ( )
  • sort ( )
  • concat ( )
  • append ( )

Before we look at each function, we need to create an example dataset so that you could understand the function better through the examples. And import the pandas library as pd which is a name we will use in the following code. Then follows explanation, examples and exercise of each function listed above.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Hope you find it is helpful for you to learn more about Pandas!

Featured

Pandas in Python – Selecting data

Hi,

This is Jing, a data scientist with great passion for applying data science and big data technology in the industry. Today you are going to learn Pandas with me. I will talk about how to using Pandas to select data when you are processing data with python in this blog.

Here is a list of commonly used functions in pandas for selecting data we will cover today in this blog.

  • iloc[]
  • sample()
  • isin()
  • where()
  • query()
  • not()
  • get()
  • lookup()

Before we look at each function, we need to create an example dataset so that you could understand the function better through the examples. And import the pandas library as pd which is a name we will use in the following code. Then follows explanation, examples and exercise of each function listed above.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Hope you find it is helpful for you to learn more about Pandas!