Skip to main content

Improved value counts

Project description

countvalues

Install

pip install countvalues

How to use

import pandas as pd
from countvalues.core import count_values
df = pd.read_csv('../data/titanic.csv')
df.head()
<style scoped> .dataframe tbody tr th:only-of-type { vertical-align: middle; }
.dataframe tbody tr th {
    vertical-align: top;
}

.dataframe thead th {
    text-align: right;
}
</style>
PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
0 1 0 3 Braund, Mr. Owen Harris male 22.0 1 0 A/5 21171 7.2500 NaN S
1 2 1 1 Cumings, Mrs. John Bradley (Florence Briggs Th... female 38.0 1 0 PC 17599 71.2833 C85 C
2 3 1 3 Heikkinen, Miss. Laina female 26.0 0 0 STON/O2. 3101282 7.9250 NaN S
3 4 1 1 Futrelle, Mrs. Jacques Heath (Lily May Peel) female 35.0 1 0 113803 53.1000 C123 S
4 5 0 3 Allen, Mr. William Henry male 35.0 0 0 373450 8.0500 NaN S
count_values(df, 'Sex')
<style scoped> .dataframe tbody tr th:only-of-type { vertical-align: middle; }
.dataframe tbody tr th {
    vertical-align: top;
}

.dataframe thead th {
    text-align: right;
}
</style>
Sex count percentual cumulative_percentual
0 female 314 0.352413 0.352413
1 male 577 0.647587 1.000000

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

countvalues-0.0.1.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

countvalues-0.0.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file countvalues-0.0.1.tar.gz.

File metadata

  • Download URL: countvalues-0.0.1.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for countvalues-0.0.1.tar.gz
Algorithm Hash digest
SHA256 80ab8a928e75756915d812e04a0653352116708123e3b9b748bce40b1c4e2f6f
MD5 aa54eeb5b1dae96a3d7c42fc7e1ef352
BLAKE2b-256 3e9afcdb35058dee78a8de6ee8de47f024687bd2a7f862a6672ee10303bef1d7

See more details on using hashes here.

File details

Details for the file countvalues-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: countvalues-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for countvalues-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 253577dadb04f3ac17748fb00a7210fef0a87b7a1337edaca6f7de423d01d2a2
MD5 396f32fc93c94b6380bc7824ef9f045f
BLAKE2b-256 d5e067063a274bf0f03ebef062df8d7a89ad7e83b6812fede8c1fabbe16d730e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page