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

Separate Header File #31

Open
ahmedmohammed107 opened this issue Apr 15, 2024 · 0 comments
Open

Separate Header File #31

ahmedmohammed107 opened this issue Apr 15, 2024 · 0 comments

Comments

@ahmedmohammed107
Copy link
Contributor

@sgoldenCS
Based on our conversation, I am now updating the "names" of the columns in the configuration file directly. However, we will need to think of a way to solve the problem when we have a separate file containing the header names of the csv files. There are multiple solutions that we discussed so far:

  1. Manually read the header file in the driver and save the list of header names in the "names" variable. We then update the read_kwargs dictionary with this names variable. Finally, we make the Pandas Parser with the updated read_kwargs. This is the most straightforward way but it requires additional work in the driver itself.

  2. Define a new parser in which I read the header file and save the list "names". Inside that parser I will make your Pandas Parser. Advantage: It is flexible to call whatever Parser version you develop. Disadvantage: I have to define every method that you have in your Parser. It will look something like:
    def load_data():
    return self.steven_parser.load_data()

  3. Define a new parser that inherits from your defined parser. Advantage: All your methods are now defined. Disadvantage: We are strictly inheriting a specific version. If we want to inherit a new version, we will have to manually change the inherited class to your new version.

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

No branches or pull requests

1 participant