Python Pandas at a Glance
Pandas Author : | Wes McKinney |
About Pandas | pandas is a software library written for the Python programming language for data manipulation and analysis. |
NumPy Array : | contains values of the same/homogeneous type |
Create empty array of size m x n | numpy.empty ([m ,n]) |
create a 1D array using arrange function of size N | arr = np.arrange(N) |
Default Data Type of Array | float64 |
Creating Series with NaN Values | obj = pd.Series([2 , 5, np.Nan , 4]) |
Series : | one-dimensional array-like object (containing an array of data and an associated array of data labels, called its index) |
To fetch first n rows from pandas object P | P.head(n) |
To fetch last n rows from a pandas object P. | P.tail(n) |
To retrieve dimensions (shape) of Series Object | P.shape() |
To create M x M identity matrix | np.eye(M) |