From 23f52c37d4a3b94464b947a3a545647094b091be Mon Sep 17 00:00:00 2001 From: daviel9 Date: Tue, 20 Aug 2024 13:27:42 +0100 Subject: [PATCH] Add comments for removing empty rows and columns --- gptables/examples/survey_data.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gptables/examples/survey_data.py b/gptables/examples/survey_data.py index a623ff1..f7b07ee 100644 --- a/gptables/examples/survey_data.py +++ b/gptables/examples/survey_data.py @@ -14,8 +14,8 @@ parent_dir = Path(__file__).parent labour_market_data = pd.read_csv(parent_dir / "survey_data.csv") -labour_market_data.dropna(axis=0, how="all", inplace=True) -labour_market_data.dropna(axis=1, how="all", inplace=True) +labour_market_data.dropna(axis=0, how="all", inplace=True) # Remove empty rows in the data +labour_market_data.dropna(axis=1, how="all", inplace=True) # Remove columns rows in the data col_names = ["Time period and dataset code row", "Number of people", "Economically active", @@ -99,8 +99,8 @@ ## Notesheet notes_table = pd.read_csv(parent_dir / "survey_data_notes.csv") -notes_table.dropna(axis=0, how="all", inplace=True) -notes_table.dropna(axis=1, how="all", inplace=True) +notes_table.dropna(axis=0, how="all", inplace=True) # Remove empty rows in the data +notes_table.dropna(axis=1, how="all", inplace=True) # Remove columns rows in the data notes_table.columns = ['Note reference', 'Note text'] ## Use write_workbook to win!