Pandas Dataframe Methods

Pandas DataFrames are the cornerstone of data manipulation, offering an extensive suite of methods for effective data analysis. It deals with methods like merge() to merge datasets, groupby() to group data for analysis and pivot() to pivot tables for better insights.

Pandas merge()

Pandas merge() merges two DataFrames together

Pandas sample()

sample() randomly selects a given number of rows

Pandas astype()

astype() cast pandas object to specified datatype

Pandas isin()

isin() checks if value of df1 is contained in df2

Pandas head()

head() returns the first n rows of a pandas object

Pandas shift()

shifts values of pandas object along desired axis

Pandas describe()

describe() provides statistical summary of dataset

Pandas rank()

rank() compute the rank of each element in the df

Pandas groupby()

groups rows based on columns,performs agg function

Pandas pivot()

pivot() reshapes data

Pandas quantile()

returns values at the given quantile over the axis

Pandas diff()

calculate the difference of two dataframes

Pandas join()

allows to combine two dfs based on their indexes

Pandas reset_index()

resets the index of a DataFrame

Pandas assign()

creates a new column in df or modify existing one

Pandas to_dict()

converts a Dataframe into a dictionary

Pandas apply()

applies a function along the axis of a dataframe

Pandas drop()

removes rows or columns from a dataframe

Pandas iloc[]

used for integer-location base data selection

Pandas fillna()

fills missing values (NaN) in a DataFrame

Pandas melt()

reshapes DataFrame from wide format to long format

Pandas drop_duplicates()

drops duplicate rows from a DataFrame

Pandas sort()

sorts a DataFrame by one or more columns

Pandas DataFrame filter()

filters rows/columns from a df based on condition

Pandas dropna()

drops missing values (NaN) from a dataframe

Pandas ewm()

provides function to emphasize more on recent data

Pandas nunique()

returns the number of unique values over the axis

Pandas explode()

transform elements of list-like element to row

Pandas to_csv()

used to write to a CSV file

Pandas loc[]

used to select data from a DataFrame

Pandas rolling()

used to perform rolling window calculations

Pandas count()

used to count non-missing values

Pandas set_index()

used to set the index of a DataFrame

Pandas mean()

compute the arithmetic mean of a set of numbers

Pandas iterrows()

used to iterate over the rows of a DataFrame

Pandas replace()

used to replace values in a DataFrame

Pandas rename()

used to rename columns or index labels

Pandas cumsum()

used to provide the cumulative sum of elements

Pandas mask()

replace values where certain conditions are met

Pandas prod()

used to calculate the product of the values

Pandas round()

used to round values to a specified number

Pandas items()

used to iterate over the columns

Pandas first()

used to select the first n rows of data

Pandas abs()

used to compute the absolute value of each element

Pandas multiply()

used to multiply elements within a DataFrames

Pandas transpose()

used to interchange rows and columns

Pandas aggregate()

used to perform summary computations on data

Pandas sum()

used to calculate the sum of a DataFrame

Pandas where()

used to replace values in a DataFrame

Pandas div()

used to divide one DataFrame by another DataFrame

Pandas at[]

used to get a single value from a DataFrame

Pandas all()

used to check if all elements in a DataFrame

Pandas itertuples()

used to iterate over the rows of a DataFrame

Pandas get_dummies()

converts categorical variable into dummy variable

Pandas slice()

selects a range of rows or columns by their labels

Pandas plot()

allows to create types of plots and visualization

Pandas reindex()

allows to change the index, columns, or both of df

Pandas read_csv()

convert a CSV file into a DataFrame

Pandas to_sql()

write records stored in a df to a SQL database

Pandas resample()

converts time series data to a different frequency

Pandas pivot_table()

allows us to create spreadsheet-style pivot table

Pandas from_dict()

convert a dictionary into a Pandas DataFrame.

Pandas std()

computes standard deviation of set of numerics

Pandas to_excel()

write a DataFrame to an Excel file.

Pandas query()

extract rows from df that satisfy given condition

Pandas to_json()

convert a DataFrame to a JSON-formatted string

Pandas hist()

plot histograms to summarize the data distribution

Pandas insert()

inserts column into a df at a specified location

Pandas boxplot()

create box plots to show the distribution of data

Pandas corr()

compute pairwise correlation coefficient of column

Pandas update()

update df in place using non-NA value from next df

Pandas notnull()

detect existing (non-missing) values in the data

Pandas copy()

creates a separate copy of a DataFrame

Pandas duplicated()

mark duplicate rows based on column values.

Pandas var()

computes the variance of a dataset.

Pandas info()

provides a concise summary of a DataFrame.

Pandas mode()

returns the mode(s) of a dataset.

Pandas to_string()

convert a DataFrame into a string representation

Pandas crosstab()

allows us to create contingency tables.

Pandas read_excel()

allows us to import data from excel files.