Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update README and add summary stats func #7

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Catherine Meng, Jessie Zhang, Zheng He
- **`missing_value_summary`**\
This function is to provide a summary of missing values in the dataset.
- **`get_summary_statistics`**
Generate summary statistics for specified columns or all columns if none are provided.

## Installation

Expand Down
21 changes: 21 additions & 0 deletions src/pyeda/data_summary.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
def get_summary_statistics(df, col = None):
"""
Generate summary statistics for specified columns or all columns if none are provided.

This function will return the important statistics (e.g. mean, min, std) for numeric columns, as well as
some key metrics (e.g. count, unique) for non-numeric columns.

Parameters
----------
df : pd.DataFrame
The dataframe containing the data for analysis.
col : list or None
A list of column names for which to get statistics.
Default value is None, the function will apply for all columns.

Returns
----------
pd.DataFrame
A DataFrame with summary statistics for the specified columns.
"""
pass
Loading