Skip to main content

Calculate word counts in a text file!

Project description

pycounts_johnshiu

Calculate word counts in a text file!

Installation

$ pip install pycounts_johnshiu

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_johnshiu was created by John Shiu. It is licensed under the terms of the MIT license.

Credits

pycounts_johnshiu 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_johnshiu-0.1.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pycounts_johnshiu-0.1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/22.6.0

File hashes

Hashes for pycounts_johnshiu-0.1.0.tar.gz
Algorithm Hash digest
SHA256 21ec3de8f772014bef8ac4d7c030b8bb143feb41ffc257a1c6feac9f6e717168
MD5 d1dd452f043880f8a4dc2c0d991682fb
BLAKE2b-256 7bc1cede812750f3eee7dfefbcb3bca1be916b05f3ec3047cdc5d4a06daa764f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pycounts_johnshiu-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71263ffededd1ef367f0970f86e4453849b6ad14a1cd8ba392aec0854b673223
MD5 8ead9f3aaed7292d3f56a92b5e4da5bf
BLAKE2b-256 d338c36e7f70899447d5562a17ceb0554ca04eb3764c7f02d1f89263c16bc229

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