repair_data / README.md
savedata101's picture
Update README.md
cb39224 verified
metadata
license: other
tags:
  - csv
configs:
  - config_name: cleaned
    data_files:
      - split: train
        path: cleaned.csv

Repair Data (Cleaned Preview)

This dataset publishes the contents of the repair_data folder, with the dataset UI preview focused on cleaned.csv. The cleaned file is produced with csv_repair.py to standardize types, trim whitespace, harmonize null-like tokens, and optionally split a location column into city and country. City names can be made country-specific using a real city catalog built from GeoNames.

Files

  • cleaned.csv — primary data file targeted for preview.
  • Other helper scripts and reports are included for reproducibility (e.g., csv_repair.py, extract_countries.py, geonames_fetch.py, JSON mappings under report/).

If cleaned.csv lives in a subfolder, update the front‑matter viewer.default_path to that path (e.g., report/cleaned.csv).

How It Was Built

  • Analysis and cleaning: csv_repair.py (trims strings, standardizes boolean‑like values, parses dates where feasible, detects outliers, suggests column fixes).
  • Location repair (optional): splits location into city and country.
    • Real city mode: --location-mode real --cities-json report/cities_by_country.json.
  • GeoNames data: geonames_fetch.py builds countries.json, provinces_by_country.json, and cities_by_country.json.

Example command to generate cleaned.csv:

python csv_repair.py
-i HR_Data_Clean_2020_2025.csv
-o report
--cleaned-csv cleaned.csv
--fix-location
--location-mode real
--cities-json report/cities_by_country.json

Load Examples

  • With datasets:

from datasets import load_dataset ds = load_dataset("savedata101/repair_data", data_files={"train": "cleaned.csv"}) print(ds["train"])

  • With pandas (direct URL to main branch):

import pandas as pd url = "https://huggingface.co/datasets/savedata101/repair_data/resolve/main/cleaned.csv" df = pd.read_csv(url) print(df.head())

Notes

  • Preview focuses on cleaned.csv via the dataset card front‑matter.
  • If your cleaned file path changes, keep viewer.default_path in sync.
  • Large original CSVs may be excluded from preview but remain accessible in the repo.

License

Data license is set to other as a placeholder. Please update to the appropriate license for your data.