Fundamentals 10 min read

A Comprehensive List of Commonly Used Pandas Functions Categorized by Purpose

This article presents a curated collection of 100 frequently used pandas functions, organized into six categories—statistical aggregation, data cleaning, data selection, plotting and element‑wise operations, time‑series utilities, and miscellaneous helpers—providing concise Chinese explanations for each function’s purpose.

Python Programming Learning Circle
Python Programming Learning Circle
Python Programming Learning Circle
A Comprehensive List of Commonly Used Pandas Functions Categorized by Purpose

This article compiles 100 commonly used pandas functions and groups them into six functional categories, offering brief Chinese descriptions of each function’s meaning and typical use cases.

Statistical Aggregation Functions

Function

Meaning min() Calculate the minimum value max() Calculate the maximum value sum() Compute the sum mean() Calculate the average count() Count non‑missing elements size() Count all elements median() Calculate the median var() Calculate variance std() Calculate standard deviation quantile() Calculate any quantile cov() Calculate covariance corr() Calculate correlation coefficient skew() Calculate skewness kurt() Calculate kurtosis mode() Calculate the mode describe() Descriptive statistics (returns multiple results at once) groupby() Group data aggregate() Aggregate operation (custom aggregation functions allowed) argmin() Find position of the minimum value argmax() Find position of the maximum value any() Logical OR across elements all() Logical AND across elements value_counts() Frequency count cumsum() Cumulative sum cumprod() Cumulative product pct_change() Percentage change between consecutive elements

Data Cleaning Functions

Function

Meaning duplicated() Check if elements are duplicated drop_duplicates() Remove duplicate values hasnans() Check if series contains NaNs (returns True/False) isnull() Identify missing values (bool series) notnull() Identify non‑missing values (bool series) dropna() Drop missing values fillna() Fill missing values ffill() Forward fill missing values bfill() Backward fill missing values dtypes() Inspect data types astype() Cast to a different type pd.to_datetime Convert to datetime type factorize() Factorize (encode) categorical values sample() Random sampling where() Conditional replacement replace() Replace values (no regex) str.replace() Replace using regex str.split.str() Split strings

Data Selection Functions

Function

Meaning isin() Check membership between() Range check loc() Label‑based indexing (for DataFrames) iloc() Position‑based indexing (for DataFrames) compress() Conditional selection nlargest() Top‑n largest elements nsmallest() Top‑n smallest elements str.findall() Find all substrings (regex supported)

Plotting and Element‑wise Operation Functions

Function

Meaning hist() Draw histogram plot() General plot (kind parameter for pie, line, box, etc.) map() Element‑wise mapping apply() Apply custom function element‑wise

Time‑Series Functions

Function

Meaning dt.date() Extract date component dt.time() Extract time component (hour, minute, second) dt.year() Extract year dt.month() Extract month dt.day() Extract day dt.hour() Extract hour dt.minute() Extract minute dt.second() Extract second dt.quarter() Extract quarter dt.weekday() Extract weekday as integer dt.weekday_name() Extract weekday name dt.week() Extract week number of the year dt.dayofyear() Extract day of the year dt.daysinmonth() Number of days in the month dt.is_month_start() Is first day of the month dt.is_month_end() Is last day of the month dt.is_quarter_start() Is first day of the quarter dt.is_quarter_end() Is last day of the quarter dt.is_year_start() Is first day of the year dt.is_year_end() Is last day of the year dt.is_leap_year() Is a leap year

Other Useful Functions

Function

Meaning append() Append elements from another series diff() First‑order difference round() Round elements sort_values() Sort by values sort_index() Sort by index to_dict() Convert to dictionary tolist() Convert to list unique() Return unique elements

These tables provide a quick reference for pandas users to locate the appropriate function for statistical aggregation, data cleaning, selection, visualization, time‑series manipulation, and other common tasks.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Pythonstatisticsdata analysisdata cleaningpandasdata manipulation
Python Programming Learning Circle
Written by

Python Programming Learning Circle

A global community of Chinese Python developers offering technical articles, columns, original video tutorials, and problem sets. Topics include web full‑stack development, web scraping, data analysis, natural language processing, image processing, machine learning, automated testing, DevOps automation, and big data.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.