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

Implement datetime_formats in DatetimeInspector #125

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

Femi-lawal
Copy link
Contributor

Description

I have enhanced the DatetimeInspector class to include the capability to detect the specific format of datetime data in each identified datetime column. This enhancement involves adding a new method detect_datetime_format which iterates over a list of user-defined and preset datetime formats, attempting to parse dates in a series using each format. The fit method has been updated to utilize this new functionality, thereby not only identifying datetime columns but also determining their specific formats.

Motivation and Context

It was requested in #95

How has this been tested?

The changes have been thoroughly tested with a series of new unit tests that cover a wide range of scenarios, including:

  • Successful format detection for uniform datetime series.
  • Detection failure in cases of mixed valid and invalid datetime strings.
  • Proper utilization of user-defined formats in format detection.

Types of changes

  • Maintenance (no change in code, maintain the project's CI, docs, etc.)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@MooooCat
Copy link
Contributor

Cool! I will finish the code review as soon as possible.

Copy link
Contributor

@MooooCat MooooCat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for being a developer of SDG.

@Wh1isper
Copy link
Collaborator

Thank you!

@Wh1isper Wh1isper merged commit 73e9476 into hitsz-ids:main Jan 31, 2024
11 checks passed
@Femi-lawal
Copy link
Contributor Author

Femi-lawal commented Jan 31, 2024

Thank you! 😁

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 this pull request may close these issues.

None yet

3 participants