Skip to main content

Calculate word counts in a text file!

Project description

pycounts

Calculate word counts in a text file!

This is an exercise to learn how to build a python module following this guide: https://py-pkgs.org/03-how-to-package-a-python#counting-words-in-a-text-file

Installation

$ pip install pycounts

Usage

pycounts can be used to count words in a text file and plot results as follows:

from pycounts.pycounts import count_words
from pycounts.plotting import plot_words
import matplotlib.pyplot as plt

file_path = "test.txt"  # path to your file
counts = count_words(file_path)
fig = plot_words(counts, n=10)
plt.show()

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

pycounts was created by Tomas Beuzen. It is licensed under the terms of the MIT license.

Credits

pycounts was created with cookiecutter and the py-pkgs-cookiecutter template.

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

pycounts_nikita-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

pycounts_nikita-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file pycounts_nikita-0.1.0.tar.gz.

File metadata

  • Download URL: pycounts_nikita-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.5 Linux/5.11.0-44-generic

File hashes

Hashes for pycounts_nikita-0.1.0.tar.gz
Algorithm Hash digest
SHA256 05fc956da0efca99207ea7794da17ea1ccd8f8d3527026a08ed40858d6d3cf5c
MD5 59e8c1bab2d0a67b3a22557c1d9f53e4
BLAKE2b-256 79bb8dc5027a020b931a8f6671ae921aee55cd870ac43d87e4e3006c161ee28a

See more details on using hashes here.

File details

Details for the file pycounts_nikita-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pycounts_nikita-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.5 Linux/5.11.0-44-generic

File hashes

Hashes for pycounts_nikita-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c287c2accfa4fa728a3c1ddded50fa359f5ee2b10c9884f87c7edbfb53326b6
MD5 44e9db7a9d79096d9b36ddd111d030c4
BLAKE2b-256 22db8698ccd2aea7e5cdbefa995fe4fb08c3535d290fda8a0366deace9cb35e7

See more details on using hashes here.

Supported by

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