We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If I accidentally pass an empty DataFrame into a fit function, I receive an error that doesn't really describe what is happening.
fit
data = pd.DataFrame({'a': [], 'b': [], 'c': []}) metadata = SingleTableMetadata.load_from_dict({ 'columns': { 'a': { 'sdtype': 'numerical' }, 'b': { 'sdtype': 'numerical' }, 'c': { 'sdtype': 'numerical' } } }) constraint = { 'constraint_class': 'Inequality', 'constraint_parameters': { 'low_column_name': 'a', 'high_column_name': 'b' } } synthesizer = GaussianCopulaSynthesizer(metadata) synthesizer.add_constraints(constraints=[constraint]) synthesizer.fit(data)
Output:
AggregateConstraintsError: index 0 is out of bounds for axis 0 with size 0
The error message should be more explicit.
ValueError: Your dataset is empty.
The error seems to be correct if I do not add any constraints.
data = pd.DataFrame({'a': [], 'b': [], 'c': []}) metadata = SingleTableMetadata.load_from_dict({ 'columns': { 'a': { 'sdtype': 'numerical' }, 'b': { 'sdtype': 'numerical' }, 'c': { 'sdtype': 'numerical' } } }) synthesizer = GaussianCopulaSynthesizer(metadata) synthesizer.fit(data)
The text was updated successfully, but these errors were encountered:
lajohn4747
Successfully merging a pull request may close this issue.
Problem Description
If I accidentally pass an empty DataFrame into a
fit
function, I receive an error that doesn't really describe what is happening.Output:
Expected behavior
The error message should be more explicit.
Context
The error seems to be correct if I do not add any constraints.
Output:
The text was updated successfully, but these errors were encountered: