MCPcopy
hub / github.com/treeverse/dvc / to_json

Method to_json

dvc/database.py:63–68  ·  view source on GitHub ↗
(self, file: StrOrBytesPath, progress=noop)

Source from the content-addressed store, hash-verified

61 progress(len(df))
62
63 def to_json(self, file: StrOrBytesPath, progress=noop): # noqa: ARG002
64 import pandas as pd
65
66 df = pd.read_sql(self.sql, self.con)
67 with atomic_file(file) as f:
68 df.to_json(f, orient="records")
69
70 def export(self, file: StrOrBytesPath, format: str = "csv", progress=noop): # noqa: A002
71 if format == "json":

Callers 1

exportMethod · 0.95

Calls 1

atomic_fileFunction · 0.85

Tested by

no test coverage detected