MCPcopy Create free account
hub / github.com/datapane/datapane / gen_df

Function gen_df

python-client/src/datapane/builtins.py:75–79  ·  view source on GitHub ↗

Return a test simple df

(dim: int = 4)

Source from the content-addressed store, hash-verified

73
74
75def gen_df(dim: int = 4) -> pd.DataFrame:
76 """Return a test simple df"""
77 axis = [i for i in range(0, dim)]
78 data = {"x": axis, "y": axis}
79 return pd.DataFrame.from_dict(data)
80
81
82def gen_table_df(rows: int = 4, alphabet: str = "ABCDEF") -> pd.DataFrame:

Callers 8

test_markdown_formatFunction · 0.90
test_build_md_viewFunction · 0.90
test_gen_view_primitivesFunction · 0.90
gen_plotFunction · 0.85
_gen_matplotlibFunction · 0.85

Calls

no outgoing calls

Tested by 4

test_markdown_formatFunction · 0.72
test_build_md_viewFunction · 0.72
test_gen_view_primitivesFunction · 0.72