11 Tweets Dec 06, 2022
Here are the most commonly used Pandas methods & attributes you should be familiar with, with examples
Ađź§µ
âś…head
This function returns the first n(default 5) rows for the object based on position.
It is useful for quickly testing if your object has the right type of data in it.
âś…shape
Returns a tuple containing (rows, columns) present in a dataframe
âś…size
Quickly view the number of elements in a dataframe
âś…infoâś…
This method prints information about a DataFrame including the index dtype and columns, non-null values and memory usage
Takes in below optional parameters
-- verbose
-- null_counts
-- memory_usage
-- show_counts
-- buf
âś… describe()
Descriptive statistics include those that summarize the central tendency, dispersion and shape of a dataset’s distribution, excluding `NaN` values
âś…value_counts
value_counts() returns a Pandas Series containing the counts of unique values
âś…drop_duplicates
Return DataFrame with duplicate rows removed(if present).
(Our example data has no duplicates)
âś… groupby
Group DataFrame using a mapper or by a Series of columns
Others you should know
âś… mergre()
âś… sort_values()
âś… fillna()
âś… unique()
âś… apply()
That is it for today.
Follow me @_jaydeepkarale for more content around
-- Python
-- AI/ML
-- Software Engineering
Subscribe to my YouTube if you prefer to learn via video tutorials
youtube.com

Loading suggestions...