Skip to main content

Calculate word counts in a text file!

Project description

pycounts2

Calculate word counts in a text file

codecov

Installation

$ pip install pycounts

Usage

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

from pycounts2.pycounts2 import count_words
from pycounts2.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

pycounts2-0.3.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

pycounts2-0.3.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file pycounts2-0.3.0.tar.gz.

File metadata

  • Download URL: pycounts2-0.3.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pycounts2-0.3.0.tar.gz
Algorithm Hash digest
SHA256 597dd2142c7491e8bc86fb7d30ae3a50a2a16d5333f0cd8ed3cd70a55976f144
MD5 decbb168de28ba14fc92f95e2e132ab4
BLAKE2b-256 bd9d3a5f1671da2c3a19e6f7e8c5d39a3d0572d95dd08e9e3f5ae4fb1743f6f1

See more details on using hashes here.

File details

Details for the file pycounts2-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pycounts2-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pycounts2-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38213a80b2c9a4d1765065e63aca36dd28390d9fb6e77189d515ba5c6261d7fc
MD5 38745c83a2aa37f194e9b18ef102f218
BLAKE2b-256 8f715ee5538a18deeb6d96ca823b3abd3bcc326bb5d189ddab8f36b252def5a9

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