Pandas is an open source Python library providing high-performance data manipulation and analysis tools via its powerful data structures. The name Pandas is derived from “panel data,” an econometrics term from multidimensional data.
The following are the key features of the Pandas library:
• Provides a mechanism to load data objects from different formats
• Creates efficient data frame objects with default and customized indexing
• Reshapes and pivots date sets
• Provides efficient mechanisms to handle missing data
• Merges, groups by, aggregates, and transforms data
• Manipulates large data sets by implementing various
functionalities such as slicing, indexing, subsetting, deletion, and insertion
• Provides efficient time series functionality
Sometimes you have to import the Pandas package since the standard Python distribution doesn’t come bundled with the Pandas module.
A lightweight alternative is to install Numpy using popular the Python package installer pip. The Pandas library is used to create and process series, data frames, and panels.
The lambda operator is a way to create small anonymous functions, in other words, functions without names. These functions are throwaway functions; they are just needed where they have been created. The lambda feature is useful mainly for Lisp programmers. Lambda functions are used in combination with the functions filter(), map(), and reduce().
The map() function is used to apply a specific function on a sequence ofdata. The map() function has two arguments.
r = map(func, seq)
Here, func is the name of a function to apply, and seq is the sequence (e.g., a list) that applies the function func to all the elements of the sequence seq.
The filter() function is an elegant way to filter out all elements of a list for which the applied function returns true.
For instance, the function filter(func, list1) needs a function called func as its first argument. func returns a Boolean value, in other words,
either true or false. This function will be applied to every element of the list list1. Only if func returns true will the element of the list be included in the result list.