From 1e9d3f86df0af4806c933f5b96d958ba1f9dc9f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beniamino=20Vigan=C3=B2?= <69852812+benvigano@users.noreply.github.com> Date: Fri, 19 May 2023 17:41:23 +0200 Subject: [PATCH] Update _simpler_sf.py Fixed a bug in _detect_fields() --- simpler_sf/_simpler_sf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simpler_sf/_simpler_sf.py b/simpler_sf/_simpler_sf.py index a936acf..6f02400 100644 --- a/simpler_sf/_simpler_sf.py +++ b/simpler_sf/_simpler_sf.py @@ -163,7 +163,7 @@ def _smart_query( output_df = pd.concat(dfs) # If the query didn't output any records, add the columns for output consistency - if len(dfs) == 0: + if output_df.shape[0] == 0: # Determine the columns from the query output_df = pd.DataFrame(columns=_determine_fields(query)) else: