From 03c05cd4e2829a68416da7f864507cafd7de703c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Bel=C3=A1k?= Date: Thu, 5 Oct 2023 16:13:11 +0200 Subject: [PATCH] refactor: fix typos --- edvart/data_types.py | 2 +- edvart/report.py | 8 ++++---- edvart/report_sections/bivariate_analysis.py | 2 +- edvart/report_sections/dataset_overview.py | 6 +++--- edvart/report_sections/group_analysis.py | 2 +- edvart/report_sections/multivariate_analysis.py | 2 +- .../timeseries_analysis/rolling_statistics.py | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/edvart/data_types.py b/edvart/data_types.py index 4647b08..8c31507 100644 --- a/edvart/data_types.py +++ b/edvart/data_types.py @@ -85,7 +85,7 @@ def is_numeric(series: pd.Series) -> bool: """ if is_missing(series): return False - # When an unkown dtype is encountered, `np.issubdtype(series.dtype, np.number)` + # When an unknown dtype is encountered, `np.issubdtype(series.dtype, np.number)` # raises a TypeError. This happens for example if `series` is `pd.Categorical` # If the dtype is unknown, we treat it as non-numeric, therefore return False. try: diff --git a/edvart/report.py b/edvart/report.py index 03b1907..47ab467 100755 --- a/edvart/report.py +++ b/edvart/report.py @@ -105,7 +105,7 @@ def _generate_notebook( dataset_name : str (default = "[INSERT DATASET NAME]") Name of dataset to be used in the title of the report. dataset_description : str (default = "[INSERT DATASET DESCRIPTION]") - Descritpion of dataset to be used below the title of the report. + Description of dataset to be used below the title of the report. load_df : str (default = 'df = ...') Code string for loading a dataset to variable `df`. extra_imports : List[str], optional @@ -617,7 +617,7 @@ class DefaultReport(Report): Verbosity of the overview section verbosity_univariate_analysis : Verbosity, optional Verbosity of the univariate analysis section - verbosity_bivariate_analysis : Verbosity, optiona + verbosity_bivariate_analysis : Verbosity, optional Verbosity of the bivariate analysis section. verbosity_multivariate_analysis: Verbosity, optional Verbosity of the multivariate analysis section @@ -833,10 +833,10 @@ class DefaultTimeseriesReport(TimeseriesReport): sampling_rate : int, optional Sampling rate for Fourier transform and Short-time Fourier transform subsections. Determines frequency unit for analysis of frequencies, for example with monthly data and sampling rate - 12, yearly frequncy spectrum is produced. + 12, yearly frequency spectrum is produced. If not set, these two sections will not be included. stft_window_size : int, optional - Windows size for short-time Fourier transform subsection. If not set, STFT will be exluded. + Windows size for short-time Fourier transform subsection. If not set, STFT will be excluded. """ def __init__( diff --git a/edvart/report_sections/bivariate_analysis.py b/edvart/report_sections/bivariate_analysis.py index 2ebfe3f..84654ba 100644 --- a/edvart/report_sections/bivariate_analysis.py +++ b/edvart/report_sections/bivariate_analysis.py @@ -992,7 +992,7 @@ def contingency_table( ax.set_xlabel(ax.get_xlabel(), fontsize=fontsize) ax.xaxis.set_label_position("top") - # Viusally separate the margins + # Visually separate the margins if include_total: ax.vlines(len(table.columns) - 1, ymin=0, ymax=len(table), color="grey") ax.hlines(len(table) - 1, xmin=0, xmax=len(table.columns), color="grey") diff --git a/edvart/report_sections/dataset_overview.py b/edvart/report_sections/dataset_overview.py index 4da50c7..b7f39d9 100644 --- a/edvart/report_sections/dataset_overview.py +++ b/edvart/report_sections/dataset_overview.py @@ -29,7 +29,7 @@ class Overview(ReportSection): Parameters ---------- subsections : List[OverviewSubsection], optional - List of subsections to inlcude into the Overview section. + List of subsections to include into the Overview section. All subsections in OverviewSubsection are used by default. verbosity : Verbosity Generated code verbosity global to the Overview sections @@ -925,7 +925,7 @@ def missing_value_row_count(df: pd.DataFrame, columns: Optional[List[str]] = Non Parameters ---------- df : pd.DataFrame - Dataframe for which to counnt missing value rows. + Dataframe for which to count missing value rows. columns : Optional[List[str]], optional List of columns to consider when counting. If None, all columns are used. """ @@ -1029,7 +1029,7 @@ def duplicate_row_count(df: pd.DataFrame, columns: Optional[List[str]] = None) - Parameters ---------- df : pd.DataFrame - Dataframe for which to counnt missing value rows. + Dataframe for which to count missing value rows. columns : Optional[List[str]], optional List of columns to consider when counting. If None, all columns are used. """ diff --git a/edvart/report_sections/group_analysis.py b/edvart/report_sections/group_analysis.py index 5e236dd..8874f07 100644 --- a/edvart/report_sections/group_analysis.py +++ b/edvart/report_sections/group_analysis.py @@ -527,7 +527,7 @@ def group_barplot( Maximum number of unique values in column to plot. If the number of unique values is higher, a warning will be issued and plot will not be shown. conditional_probability : bool (default = True) - If True, conditional probability contitioned on group will be displayed, + If True, conditional probability conditioned on group will be displayed, otherwise conditional frequency will be displayed. xaxis_tickangle : float (default = 0) Rotation angle of ticks on the x axis. diff --git a/edvart/report_sections/multivariate_analysis.py b/edvart/report_sections/multivariate_analysis.py index 2cc3427..75e8b82 100644 --- a/edvart/report_sections/multivariate_analysis.py +++ b/edvart/report_sections/multivariate_analysis.py @@ -228,7 +228,7 @@ def show_multivariate_analysis( All numeric columns are used by default. color_col : str, optional Name of the column according to which to color points in the sections. - Both numberic and categorical columns are supported. + Both numeric and categorical columns are supported. """ if columns is not None: df = df[columns] diff --git a/edvart/report_sections/timeseries_analysis/rolling_statistics.py b/edvart/report_sections/timeseries_analysis/rolling_statistics.py index 636665e..82e5bc1 100644 --- a/edvart/report_sections/timeseries_analysis/rolling_statistics.py +++ b/edvart/report_sections/timeseries_analysis/rolling_statistics.py @@ -135,7 +135,7 @@ def show_rolling_statistics( Multiple of standard deviation from mean to show bands at. Ignored if not showing bands. show_std_dev : bool (default = True) - Whether to plot rolling standard devation. + Whether to plot rolling standard deviation. color_mean : str (default = "#2040FF") Color of the line showing rolling mean. color_band : str (default = "#90E0FF")