We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c48fb4d commit c9ab2d8Copy full SHA for c9ab2d8
dfschema/core/generate.py
@@ -10,12 +10,12 @@ def generate_schema_dict_from_df(df: pd.DataFrame) -> dict:
10
columns = []
11
12
for col in df.columns:
13
- cd = {"name": col}
+ cd: dict = {"name": col}
14
15
cd["dtype"] = (
16
"string" if pd.api.types.is_string_dtype(df[col]) else str(df[col].dtype)
17
)
18
- cd["na_limit"] = max(0.9999, (df[col].isnull().mean() + 0.1)) # +10%
+ cd["na_pct_below"] = max(0.01, (df[col].isnull().mean() + 0.1)) # +10%
19
20
if pd.api.types.is_numeric_dtype(df[col]):
21
add_range = 0.05 * df[col].std()
0 commit comments