Skip to main content

Calculate word counts in a text file

Project description

pycounts_mdah

Calculate word counts in a text file

Installation

$ pip install pycounts_mdah

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_mdah was created by Michael Hewlett. It is licensed under the terms of the MIT license.

Credits

pycounts_mdah 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_mdah-0.1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

pycounts_mdah-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pycounts_mdah-0.1.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.13.1 Darwin/22.6.0

File hashes

Hashes for pycounts_mdah-0.1.0.tar.gz
Algorithm Hash digest
SHA256 926c09e60fdb1d20231f7f9f016871b3b799e9e8312f894819e30698ca6e8db6
MD5 f1927ac81c50ecae123dfb10c92069d8
BLAKE2b-256 f767d1367adb62dbf5fd3c78101cf60a67f982c8a18cab301df730c7418d21a7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pycounts_mdah-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.13.1 Darwin/22.6.0

File hashes

Hashes for pycounts_mdah-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ab8d7769084d7b2e7733fa4d64ce6ae6341fbc9486f5a18f2f7136f065d6ca3
MD5 e81b9843410a2b3ffd98eaf2456c2151
BLAKE2b-256 4d6b2f384f0e512efd737240ecce31f4e5f0172f97a2a71dceed3d39242c6afd

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