Things to Know on Pandas for Data Scientists
In pandas, there are patterns and functions that every data scientist uses once in a project, in this article we will examine important functions and concepts. You can access the codes via the Github link at the end of the article. You can also access the summary note on GitHub after reading this article.
You Should Know These Topics
Work with Empty Value on Pandas
We will use the NumPy library to insert null values, null values are found in almost all datasets, we can use pandas to edit this data. Numpy offers many useful functions, you can customize these easy-to-use functions.
pip install pandas
pip install numpy
After installing the libraries, you can call them in the project and create a dataset. If you don’t know how to create it, you can access it from the content section at the top.
import pandas as pd
import numpy as np
data = {"Column 1": [20 , 30 , np.nan] ,
"Column 2": [10 , np.nan , np.nan]}datasets = pd.DataFrame(data)
Let’s start with deleting the empty data. You can delete the row containing empty data or the row with the dropna function. The only argument of this function that you can use with or without arguments is the axis.