+7
-5
lines changedFilter options
+7
-5
lines changed Original file line number Diff line number Diff line change
@@ -158,10 +158,12 @@ def calculate_nrows(df):
158
158
n_partitions = df.rdd.getNumPartitions()
159
159
160
160
nrows = (
161
-
df.rdd.mapPartitionsWithIndex(
162
-
lambda idx, partition: [sum(1 for _ in partition)] if idx == 0 else [0]
163
-
).collect()[0]
164
-
* n_partitions
161
+
df.rdd.mapPartitionsWithIndex(
162
+
lambda idx, partition: [sum(1 for _ in partition)]
163
+
if idx == 0
164
+
else [0]
165
+
).collect()[0]
166
+
* n_partitions
165
167
)
166
168
except:
167
169
nrows = 0
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ def info_def_report(self, df, timeseries: bool) -> None: # noqa: ANN001
21
21
try:
22
22
ncols = len(df.columns)
23
23
except AttributeError:
24
-
ncols=0
24
+
ncols = 0
25
25
26
26
nrows = calculate_nrows(df)
27
27
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4