-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update README and add summary stats func
- Loading branch information
1 parent
6da1d59
commit fe96d94
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |