[GRASS-git] [OSGeo/grass-addons] ac581a: m.csv.clean: Cleaning of CSV files (#361)

Vaclav Petras noreply at github.com
Thu Jan 7 14:04:25 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/OSGeo/grass-addons
  Commit: ac581a80649fbabf1141fab2bf18d16cac93ad8e
      https://github.com/OSGeo/grass-addons/commit/ac581a80649fbabf1141fab2bf18d16cac93ad8e
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2021-01-07 (Thu, 07 Jan 2021)

  Changed paths:
    A grass7/misc/m.csv.clean/Makefile
    A grass7/misc/m.csv.clean/m.csv.clean.html
    A grass7/misc/m.csv.clean/m.csv.clean.py

  Log Message:
  -----------
  m.csv.clean: Cleaning of CSV files (#361)

Uses Python csv package to read CSV file, runs series of cleanups, esp. for
column names in the first row and also removes extra whitespace from cells.

It can prefix numbers used as column names (such as ZIP code or DOY)
and it can also identify dates and reformat them as needed using Python datetime package.

The interface is designed so that user can process large number of columns without
specifying them which means that there is some guess work inside to make that happen.
This applies esp. to columns containing date and columns with missing column name in header.

The name is derived from v.clean, hence m.csv.clean.




More information about the grass-commit mailing list