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 __repr__/ __str__ to statistics for a overview of a column #310

Closed
Gerhardsa0 opened this issue Jan 13, 2023 · 1 comment
Closed

Add __repr__/ __str__ to statistics for a overview of a column #310

Gerhardsa0 opened this issue Jan 13, 2023 · 1 comment
Labels
enhancement 💡 New feature or request

Comments

@Gerhardsa0
Copy link
Contributor

Gerhardsa0 commented Jan 13, 2023

Is your feature request related to a problem? Please describe

If we want to get a clear overview of a numerical column with min, max, mean, std... we need to make multiple function class and the Code will look something like this.

print(sup_table.target_values.statistics.mean())
print(sup_table.target_values.statistics.mode())
print(sup_table.target_values.statistics.median())
print(sup_table.target_values.statistics.standard_deviation())
print(sup_table.target_values.statistics.variance())
print(sup_table.target_values.statistics.min())
print(sup_table.target_values.statistics.max())
print(sup_table.target_values.statistics.__str__())

generated output:

180921.19589041095
140000
163000.0
79442.50288288662
6311111264.297448
34900
755000

Desired solution

Add __repr__ and/or __str__ to stastitics so the output is kind of like in the Pandas describe() function.

y = house_data.SalePrice
y.describe()

generated output:

count      1460.000000
mean     180921.195890
std       79442.502883
min       34900.000000
25%      129975.000000
50%      163000.000000
75%      214000.000000
max      755000.000000

Additional context (optional)

Related issue: #316

@Gerhardsa0 Gerhardsa0 added the enhancement 💡 New feature or request label Jan 13, 2023
@github-project-automation github-project-automation bot moved this to Backlog in Safe-DS Jan 13, 2023
@SmiteDeluxe
Copy link
Contributor

But I think we not only want statistics but also just the contents of a Column. Similar for Table, Row and Schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 💡 New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants