Skip to main content

How to use?

1. Data Process

1.1 Calculate the frequency of words

from HandyToolsPy import DataProcess as dp

words = ["a","a","a","a","b","b","c"]
res = dp.count_words_freq(words)
print(res)

output:

{'a': 4, 'b': 2, 'c': 1}

It also support csv file (DataFrame format):

Here is a csv file named sample.csv:

hello
world
haha
haha
hello
hello

the code will be:

from HandyToolsPy import DataProcess as dp
import pandas as pd

words = pd.read_csv('./sample.csv', names=["word"])
res = dp.count_words_freq(words["word"])
print(res)

output:

{'hello': 3, 'haha': 2, 'world': 1}

2. A Translator

It can automaticly detect the language of the input text and translate it to the target language.

from HandyToolsPy import translator

text = "你好"
res = translator(text, "en")
print(res)

output:

'Hello'

3. A Drawer

It can draw a BingDunDun.

from HandyToolsPy import Draw as dw

dw.draw_BingDunDun(10)

4. A Dir Tree Generator

It can generate a dir tree.

from HandyToolsPy import dir_tree

path = "Sample Path"
dir_tree(path)

output:

D:/Sample/
├── sample.exe
└── xxx
    ├── hhh
    ├── hhh.zip
    ├── xh.bmp
    ├── xxx.pptx
    └── xxx.txt

Metadata

Release files for HandyToolsPy 0.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for HandyToolsPy 0.1.10
File Size Uploaded
handytoolspy-0.1.10.tar.gz 19.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for HandyToolsPy 0.1.10
File Interpreter ABI Platform
HandyToolsPy-0.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 37.9 kB

Release files / handytoolspy-0.1.10.tar.gz

Download URL handytoolspy-0.1.10.tar.gz
Size 19.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cb617627f44dec7017b314a1bb791cf67138a7e1349acefd0204dcb7a3745f46
BLAKE2b-256 checksum
How to use checksums
28431f6b8205c72b54cecd375ad5ce458af1d9f729914efe6fd7019adee6aacf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release files / HandyToolsPy-0.1.10-py3-none-any.whl

Download URL HandyToolsPy-0.1.10-py3-none-any.whl
Size 18.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69f04486c893d9ade8c6d3fb695681c3af059b961db043a3c34d63527417136b
BLAKE2b-256 checksum
How to use checksums
61133f392f9436898619734da14999e35b5b342ed12f9342fec9efb0c1abe528
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.10 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page