Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Criar coluna com dados tratados #432

Closed
joellensilva opened this issue Oct 19, 2023 · 1 comment · Fixed by dadosjusbr/armazenador#29
Closed

Criar coluna com dados tratados #432

joellensilva opened this issue Oct 19, 2023 · 1 comment · Fixed by dadosjusbr/armazenador#29
Assignees

Comments

@joellensilva
Copy link
Contributor

tratar coluna de itens para remover acentos e deixar minúsculo

@joellensilva joellensilva self-assigned this Oct 19, 2023
@joellensilva
Copy link
Contributor Author

joellensilva commented Oct 19, 2023

  • Converte caracteres para minúsculo (ex: "Licença-prêmio" --> licença-prêmio): função tolower(item)
  • substitui acentuações (ex: "licença-prêmio" --> "licenca-premio"): função stringi::stri_trans_general(item, "latin-ascii")
  • remove pontuações e caracteres não alfanuméricos (ex: "conv. licenca premio pecunia - decreto n° 1234" --> "conv licenca premio pecunia decreto n 1234"): função: stringr::str_remove_all(item, '[:punct:]')
  • remove espaços duplos e espaços antes/depois da string (ex: " conversao de licenca-premio em pecunia " --> "conversao de licenca-premio em pecunia"): função stringr::str_squish(item)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant