larsyencken / csvdiff

Generate a diff between two tabular datasets expressed in CSV files.
BSD 3-Clause "New" or "Revised" License
132 stars 31 forks source link

Filter significance types #57

Closed bclews closed 4 years ago

bclews commented 5 years ago

Thank you for putting this library together! I was glad to see that I could hook into the API to compare records. I am writing a script to compare data across different databases and this library has been very helpful in that process.

This pull request contains a bug fix, and an enhancement.

Bug fix: the data in my records contains python datetime objects and the significance method was throwing a TypeError. I have made a minor adjustment to correct this.

Enhancement: I was using the api call "csvdiff.diff_records" to diff the records and then hooking into the patch class to filter on significance. I thought it would be nicer to add a significance parameter to the "csvdiff.diff_records" method.

I am more than happy to take on any feedback, or suggested improvements :)