A crash course on the pandas library written for Python.
Pandas is a flexible and fast tool used for analysis and data manipulation. It is used across industries and caters to the needs of data professionals on many levels.
For many it has been dubbed the “must-use” tool for data science in Python.
Advantages and disadvantages of pandas
In the section below we will go through some of the advantages of the pandas library in Python.
Advantages of pandas:
- Extensive set of features.
- Efficiency in handling large data sets.
- Built for Python.
- Its Free and open source!
Disadvantages of pandas:
- The learning curve involved.
Installing pandas
To install the pandas library on your machine you may run the following from PIP.
pip install pandas
As the pandas library is part of the Anaconda distribution you may also install it by running the following in Anaconda or Miniconda.
conda install pandas
Where to start with pandas
If you are just getting started with the pandas library or are wanting to refresh your knowledge of this amazing tool have a look at the below. A list of need to know pandas functions and some frequently asked questions.
- Get column headers from a Pandas data frame
- Select multiple columns from a Pandas data frame
- Combine two columns
- Rename columns in a data frame
- Count number of rows & columns in data frame
- Expand data frame output
- Select rows based on partial string matches
- Drop last n rows in a data frame
- Convert a list of dictionaries to Pandas data frame
- Write data frame to a CSV without index
- Iterate data in a Pandas data frame
- Replace NaN values with zeros
- Count number of NaN values in each column
- Delete a column
- Rearrange columns within a data frame
- Check whether a data frame empty
- Delete rows based on a conditional expression
- Convert index to a column
- Delete rows in based on column value