When creating the sample for header and type guessing, in addition to a window (size of sample), can we add sampling rate? For example if sampling_rate = 0.01 for every 100 lines it reads, it'd only add 1 to the self._sample up until the len(self._sample) >= self.window?
This way it should work for both streaming and file loading applications. Those who are working off of files just need to divide their window by number of rows to get their sampling rate.
Motivation for this is I often find myself with very large CSV files that are sorted and guesses based on the first n rows of 20 million are often wrong.
When creating the sample for header and type guessing, in addition to a window (size of sample), can we add sampling rate? For example if sampling_rate = 0.01 for every 100 lines it reads, it'd only add 1 to the self._sample up until the len(self._sample) >= self.window?
This way it should work for both streaming and file loading applications. Those who are working off of files just need to divide their window by number of rows to get their sampling rate.
Motivation for this is I often find myself with very large CSV files that are sorted and guesses based on the first n rows of 20 million are often wrong.