Skip to main content

Count the number of occurrences of a word in a text file

Project description

pycounts_gf

Calculate word counts in a text file!

Installation

$ pip install pycounts_gf

Usage

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

from pycounts_gf.pycounts_gf import count_words
from pycounts_gf.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_gf was created by Gabe Fairbrother. It is licensed under the terms of the MIT license.

Credits

pycounts_gf was created with cookiecutter and the py-pkgs-cookiecutter template. package originally based on this tutorial

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycounts_gf-1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

pycounts_gf-1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file pycounts_gf-1.0.tar.gz.

File metadata

  • Download URL: pycounts_gf-1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.9.9 Windows/10

File hashes

Hashes for pycounts_gf-1.0.tar.gz
Algorithm Hash digest
SHA256 ffa6e0061f3cbba79c53e477e203e871ad2c5c9c685ad6b1f5c72aa23e1a5408
MD5 6bc6cfa978a5f06cdaeea42e8a51ca4e
BLAKE2b-256 fc6665e6798bb129e68eaa559f43bc76f04267064ef72c22904b186e158784fe

See more details on using hashes here.

File details

Details for the file pycounts_gf-1.0-py3-none-any.whl.

File metadata

  • Download URL: pycounts_gf-1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.9.9 Windows/10

File hashes

Hashes for pycounts_gf-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3db1912789656081fdd5f19856614f4893062d60299aaaedeea3ef7daff28a58
MD5 45c8d119a30807008f0e2b6b70918f07
BLAKE2b-256 8fd2f40463f904e3ec0bbe157bb5bd058788cee1adb27312906a37509213ff40

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