google-data-utils 0.1.0__tar.gz → 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-data-utils
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Load public Google Sheets, CSV, and Excel files into pandas
5
5
  Author: Zomi Learner
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "google-data-utils"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  description = "Load public Google Sheets, CSV, and Excel files into pandas"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -27,12 +27,15 @@ def google_excel_to_df(url, **kwargs):
27
27
  )
28
28
 
29
29
 
30
- def google_sheet_to_df(url, **kwargs):
31
- sheet_id = extract_sheet_id(url)
30
+ def google_sheet_to_df(sheet_url, **kwargs):
31
+ # sheet_id = extract_sheet_id(url)
32
32
 
33
- csv_url = (
34
- f"https://docs.google.com/spreadsheets/d/"
35
- f"{sheet_id}/export?format=csv"
36
- )
33
+ # This only works for the first individual/worksheet
34
+ # csv_url = (
35
+ # f"https://docs.google.com/spreadsheets/d/"
36
+ # f"{sheet_id}/export?format=csv"
37
+ # )
38
+
39
+ modified_sheet_url = sheet_url.split("#")[0].replace("edit?", "export?format=csv&")
37
40
 
38
- return pd.read_csv(csv_url, **kwargs)
41
+ return pd.read_csv(modified_sheet_url, **kwargs)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-data-utils
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Load public Google Sheets, CSV, and Excel files into pandas
5
5
  Author: Zomi Learner
6
6
  License: MIT