Skip to content

Commit

Permalink
Actualizo README.
Browse files Browse the repository at this point in the history
  • Loading branch information
abenassi committed Feb 19, 2016
1 parent 4b4790f commit 01993f6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pip install data_cleaner

### Ejemplo de uso integrador

*Nota: las reglas `string`, `string_regex_split` y `string_peg_split` todavía no fueron implementadas y por lo tanton no están disponibles para su uso.*
*Nota: la regla `string_regex_split` todavía no fue implementada y por lo tanto no está disponible para su uso.*

Cómo usar el paquete para limpiar un CSV completo utilizando un set de reglas.

Expand Down Expand Up @@ -80,9 +80,6 @@ rules = [
["sujeto_obligado", [", Cargo:", "Cargo:"], ["nombre", "cargo"]]
]
},
{
"string_regex_split": []
},
{
"string_peg_split": [
["solicitante",
Expand Down Expand Up @@ -176,7 +173,8 @@ dc.save(output_path)
- "remover_columnas": ["remover_columna_1", "remover_columna_2"]
* **nombre_propio**: Capitaliza todas las palabras.
- "nombre_propio": ["capitalizar_columna_1", "capitalizar_columna_2"]
* **string**: NO IMPLEMENTADO
* **string**: Utiliza el algoritmo *Key Collision Fingerprint* para clusterizar strings con el mismo contenido
- "string": ["columna_1", "columna_2"]
* **reemplazar**: Reemplaza listas de strings por un valor.
- "reemplazar": [["columna", {"Nuevo1": ["Viejo"],
"Nuevo2": ["ViejoA", "ViejoB"]}]]
Expand All @@ -198,7 +196,7 @@ dc.save(output_path)
* **string_peg_split**: Utiliza parsing expression grammars para separar un campo.
- "string_peg_split": [
["campo",
"""
"
allowed_char = anything:x ?(x not in '1234567890() ')
nombre = ~('DNI') <allowed_char+>:n ws -> n.strip()
number = <digit+>:num -> int(num)
Expand All @@ -208,13 +206,17 @@ dc.save(output_path)
dni = ','? ws 'DNI' ws number:num -> num

values = nom_comp:n ws cargo?:c ws dni?:d ws anything* -> [n, c, d]
""",
",
["sufijo_nuevo_campo_1", "sufijo_nuevo_campo_2", "sufijo_nuevo_campo_3"]
]
]

## TODO

* filtros
* clustering

* agregar parámetro de encoding
* adivinar encoding si es posible
* reescribir README en secciones más explicativas por regla
* normalizar los campos que definen las reglas para permitir que el usuario los escriba como aparecen originalmente
* agregar regla con filtros
* escribir test de integración
* corregir estilo de fingerprint, escribir docstrings y tests
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

setup(
name='data-cleaner',
version='0.1.4',
version='0.1.5',
description="Paquete para limpieza de datos, según estándares de la SSIPyGA - Gobierno Abierto Argentina",
long_description=readme + '\n\n' + history,
author="Gobierno Abierto Argentina",
Expand Down

0 comments on commit 01993f6

Please sign in to comment.