Skip to main content

Calculate word counts in a text file! A learning project of the book Python packages

Project description

pycounts_pjlearn

Calculate word counts in a text file! A learning project of the book Python packages

Installation

$ pip install pycounts_pjlearn

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_pjlearn was created by Pan Ji. It is licensed under the terms of the MIT license.

Credits

pycounts_pjlearn 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_pjlearn-0.1.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.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pycounts_pjlearn-0.1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/23.5.0

File hashes

Hashes for pycounts_pjlearn-0.1.0.tar.gz
Algorithm Hash digest
SHA256 77e14f374839c66346b9c105eb884a6f3ce794110808d5f02026a9049c7a4f04
MD5 e508ad9d590f30ff7c66026c893f720e
BLAKE2b-256 f9b9ac689f8a72785c80876173722c17da2b00fa70128b049a876490cedce930

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pycounts_pjlearn-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/23.5.0

File hashes

Hashes for pycounts_pjlearn-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf4e028e5f0585c003918f1ff56b9acf2b882bc877ba2a6985146540f405217f
MD5 aac7baee61888535296f21a6e5388809
BLAKE2b-256 fca49724b30409ff22de8443f636b6581a067010bdb9fa5df202652c82a83348

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