klar-EDA icon indicating copy to clipboard operation
klar-EDA copied to clipboard

Implement a method for date feature extraction in csv data preprocessor

Open Ask149 opened this issue 4 years ago • 5 comments
trafficstars

Description

a. Write a method to identify the columns of type date (this may include iterating over the list of columns and using an appropriate strategy to identify if a column has values of type date)

b. Implement another method that should be able to convert the date column into a specific static format (for example - YYYY-MM-DD) and split the date column into separate columns with the following attribute values:

  1. Date of the month (for example - 28 for '2021-12-28')
  2. Month (Numerical)
  3. Year
  4. Day of the week

c. Appropriate test methods should be implemented in the date_format_tests file

Assumptions

The following assumptions can be made during the implementation

  1. No time is present in the given input date.
  2. The data frame must contain column names
  3. A list of input patterns can be assumed. (For example - you can assume the input will be in either of any known formats mentioned). input_date_format = [ 'DD/MM/YYYY', 'YYYY/DD/MM', 'MM/DD/YYYY', 'YYYY/MM/DD', 'DD-MM-YYYY', 'YYYY-DD-MM', 'MM-DD-YYYY', 'YYYY-MM-DD' ]

Input (Method -1)

None

Output (Method-1)

list of column names with values of type date

Method details

Use the data frame from the self.df variable.

Input (Method -2)

An expected format the input date should be converted to

Output (Method-2)

None

Method details

Use the data frame from the self.df variable.

Implement a method for the same with appropriate name and parameters in the csv_preprocess.py file.

In the implementation use the method convert_date_format for converting the date into a specific format & the method-1 mentioned above to get a list of columns with date type.

Note

The use of standard python libraries is highly recommended.

JOIN THE SLACK CHANNEL HERE if you wish to contribute to this issue.

Ask149 avatar Apr 04 '21 09:04 Ask149

I would like to work on this issue

asimaries avatar Apr 06 '21 05:04 asimaries

I want to work on this issue. Is it still available to work on?

mehak6569 avatar Apr 21 '21 16:04 mehak6569

@mehak6569, please find the first steps in the slack channel

Ask149 avatar Apr 21 '21 19:04 Ask149

@mehak6569, please find the first steps in the slack channel

Ok, Thank you!

mehak6569 avatar Apr 22 '21 13:04 mehak6569

I want to work on this issue. Please assign this to me. I joined to Slack channel.

HarshKumarChoudary avatar Feb 25 '22 10:02 HarshKumarChoudary