MCPcopy
hub / github.com/nalepae/pandarallel / closure

Function closure

pandarallel/core.py:186–199  ·  view source on GitHub ↗
(output_file_paths: Iterator[Path], extra: Dict[str, Any])

Source from the content-addressed store, hash-verified

184 """
185
186 def closure(output_file_paths: Iterator[Path], extra: Dict[str, Any]) -> Any:
187 def get_dataframe_and_delete_file(file_path: Path) -> Any:
188 with file_path.open("rb") as file_descriptor:
189 data = pickle.load(file_descriptor)
190
191 file_path.unlink()
192 return data
193
194 dfs = (
195 get_dataframe_and_delete_file(output_file_path)
196 for output_file_path in output_file_paths
197 )
198
199 return reduce_function(dfs, extra)
200
201 return closure
202

Callers

nothing calls this directly

Calls 11

get_progress_barsFunction · 0.85
get_chunksMethod · 0.45
get_work_extraMethod · 0.45
get_reduce_extraMethod · 0.45
updateMethod · 0.45
set_errorMethod · 0.45
reduceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…