From 34b4dece114acd6dbee879a4a3eac1a770ca376e Mon Sep 17 00:00:00 2001 From: raul-martin-dev Date: Mon, 18 Dec 2023 18:58:25 +0000 Subject: [PATCH] unformat option improved to unformat headers aswell --- Driveup/drive.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Driveup/drive.py b/Driveup/drive.py index 1ea77ea..06d0c6d 100644 --- a/Driveup/drive.py +++ b/Driveup/drive.py @@ -158,6 +158,7 @@ def df_update(self,df:Union[pd.DataFrame, List[pd.DataFrame]],id:str,sheet_name: if unformat == True: df = df.fillna('NULL') df = df.astype(str) + df.columns = df.columns.astype(str) if sheet_name == None: sheet_name = sheets[0].get("properties", {}).get("title", "Sheet1") @@ -300,5 +301,7 @@ def df_download(self,id:str,sheet_name:str=None,unformat:bool = False): if unformat == True: df = df.fillna('NULL') df = df.astype(str) + df.columns = df.columns.astype(str) + return df