- As we all know everythin in python is Object. Every Object has some Methods and Attributes.
Attributes - Properties (Ex:- dtype )
- Assueme if we have created a Series s, then the Methods and Attributes will be used with s as follows.
Attributes - s.dtype
- Methods used with small brackets [ () ], but the attributes will not be used with brackets.
- Following are the important methods of Series.
Click on them to find how to use them with example (After opening the link find the Series examples) :
- abs( ) : Return a Series/DataFrame with absolute numeric value of each element.
- add( ) : Return Addition of series and other, element-wise
- div( ) : Return Floating division of series and other, element-wise
- sub( ) : Return Subtraction of series and other, element-wise
- sum( ) : Return the sum of the values for the requested axis.
- floordiv( ) : Return Integer division of series and other, element-wise
- equals( ) : Test whether two objects contain the same elements.
- all( ) : Return whether all elements are True, potentially over an axis.
- append( ) : Concatenate two or more Series.
- astype( ) : Cast a pandas object to a specified dtype.
- copy( ) : Make a copy of this object’s indices and data.
- describe( ) : Generate descriptive statistics.
- drop( ) : Return Series with specified index labels removed.
- drop_duplicates( ) : Return Series with duplicate values removed.
- dropna( ) : Return a new Series with missing values removed.
- fillna( ) : Fill NA/NaN values using the specified method.
- replace( ) : Replace values given in to_replace with value.
- rename( ) : Alter Series index labels or name.
- reindex( ) : Conform Series to new index with optional filling logic.
- reindex_like( ) : Return an object with matching indices as other object.
- rename_axis( ) : Set the name of the axis for the index or columns.
- where( ) : Replace values where the condition is False.
- max( ) : Return the maximum of the values for the requested axis.
- min( ) : Return the minimum of the values for the requested axis.
- mean( ) : Return the mean of the values for the requested axis.
- median( ) : Return the median of the values for the requested axis.
- std( ) : Return sample standard deviation over requested axis.
- var( ) : Return unbiased variance over requested axis.
- count( ) : Return number of non-NA/null observations in the Series.
- agg( ) : Aggregate using one or more operations over the specified axis.
No comments:
Post a Comment