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

Catalog yaml loader with columns naming and translate option #49

Open
adriengoeller opened this issue Dec 23, 2024 · 0 comments
Open

Catalog yaml loader with columns naming and translate option #49

adriengoeller opened this issue Dec 23, 2024 · 0 comments
Labels
⚔️ Catalog enhancement New feature or request

Comments

@adriengoeller
Copy link
Member

Describe the current behavior

todo after #47

Describe the expected behavior

Improve the yaml loader with column rename mapping

Name: Pokemon
version: 0.1
dir: ".../.../path/to/csv"
catalog_type: FakeCatalog

columns_mapping:
  - Name: Nom
  - Type: Type
  - ...

A new translate property has to allow the user to translate the headers. Default to False.

fake_catalog.get_key("Bulbasaur") #-> pd.DataFrame
>>>  n      Name Type 1  Type 2  ...  Sp. Def  Speed  Generation  Legendary
         1     Bulbasaur  Grass  Poison  ...       65     45           1      False

fake_catalog.translate = True

fake_catalog.get_key("Bulbasaur") #-> pd.DataFrame
>>>  n      Nom   Type 1  Type 2  ...  Sp. Def  Vitesse  Generation  Legende
         1     Bulbasaur  Grass  Poison  ...       65     45           1      False

The support will be only for alphanumeric characters + underscores.

Test: Try to load the fake_catalog with headers translated in french.

Describe the motivation

No response

Extra Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚔️ Catalog enhancement New feature or request
Projects
Status: 💻 Backlog
Development

No branches or pull requests

1 participant