Skip to main content

A comprehensive Python library for statistical calculations including mean, median, mode, variance, and standard deviation

Project description

media-calc

PyPI version Python Versions License: MIT

A comprehensive Python library for statistical calculations. Simple, efficient, and easy to use.

Description

This library provides a set of robust statistical functions for data analysis. Perfect for students, researchers, and data analysts who need quick and reliable statistical calculations.

Key Features

  • Basic and advanced statistical analysis
  • Clean and intuitive API
  • Comprehensive documentation
  • No external dependencies
  • Efficient calculations
  • Handles empty lists gracefully

Installation

pip install media-calc

Usage

from media import (
    media, 
    mediana, 
    moda, 
    varianza, 
    desviacion_estandar
)

# Sample data
numbers = [2, 4, 4, 4, 5, 5, 7, 9]

# Calculate basic statistics
print(f"Mean: {media(numbers)}")          # Output: 5.0
print(f"Median: {mediana(numbers)}")      # Output: 4.5
print(f"Mode: {moda(numbers)}")           # Output: 4
print(f"Variance: {varianza(numbers)}")   # Output: 4.0
print(f"Std Dev: {desviacion_estandar(numbers)}")  # Output: 2.0

Available Functions

Basic Statistics

  • media(lista): Calculate arithmetic mean of a list of numbers
  • mediana(lista): Find the middle value of a sorted list
  • moda(lista): Find the most frequent value

Advanced Statistics

  • varianza(lista): Calculate the variance of the data
  • desviacion_estandar(lista): Calculate the standard deviation

Empty List Handling

All functions handle empty lists gracefully:

  • media(): returns 0
  • mediana(): returns 0
  • moda(): returns None
  • varianza(): returns 0
  • desviacion_estandar(): returns 0

Version Information

You can check the current version of the library:

import media
print(media.__version__)  # Shows current version

2.0: more funcioanalities added

2.1: better documentation

License

This project is licensed under the MIT License.

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

media_calc-0.2.5.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

media_calc-0.2.5-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file media_calc-0.2.5.tar.gz.

File metadata

  • Download URL: media_calc-0.2.5.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for media_calc-0.2.5.tar.gz
Algorithm Hash digest
SHA256 101f05af70e4bd14c68caf619c4616816ca54e996090f05c8f39d050c348ce1a
MD5 155768220725f6d704ba31fdfacf13a1
BLAKE2b-256 682b12e09061d37058e78068172079b4f2c4a60aaf881c1826405815f0554902

See more details on using hashes here.

File details

Details for the file media_calc-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: media_calc-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for media_calc-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6579e6a4986c6cebcdfbf00f31ab78ba57ef9eee75867f0009c49eab1dc08986
MD5 81e39d9287f4b874000f822d3ad1abb8
BLAKE2b-256 f6a72609ea8cb6f91aec1bdfe8e9854c6ef26dd462f34df88761abdefe3c68f6

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