A programmer of pandas will spend most of their time using two primary objects provided by the pandas framework:
DataFrame objects will be the overall workhorse of pandas and the most frequently used as they provide the means to manipulate tabular and heterogeneous data.
The base data structure of pandas is the
Series object, which is designed to operate similar to a NumPy array but also adds index capabilities. A simple way to create a
Series object is by initializing a
Series object with a Python array or Python list.
In : # create a four item DataFrame s = Series([1, 2, 3, 4]) s Out : 0 1 1 2 2 3 3 4 dtype: int64
This has created a pandas
Series from the ...