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

Add a sampling rate to the rowsets #162

Open
ricecooker opened this issue Jan 16, 2017 · 0 comments
Open

Add a sampling rate to the rowsets #162

ricecooker opened this issue Jan 16, 2017 · 0 comments

Comments

@ricecooker
Copy link

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.

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