Skip to main content

Your package description here

Project description

counttypes

Count types in a list - int, float, str, bool, list, set, dict, tuple

Example

from countertypes import counterTypes

data = [1, 2.2, 'hello', [1, 2], {'a': 1},  9, 18, {'a': 4}, {'a': 1}, [1, 15, 0, 8], (1, 8), 9, (89, 9), False, True]
counter = counterTypes(data)
print(counter.NonZeroTotal())
print(counter.listSum('bool'))
print(counter.lstOfBool)
print(counter.getMaxDataType())
print(counter.getMinDataType())
print(counter.getCount())
print(counter.get())
print(counter.sumOfNumeric())
print(counter.stringifyAll())

a1 = counterTypes.start()
print(counterTypes.end(a1))

print(counter.stringFy())
JSON_Text = counter.JSON()
print(JSON_Text)
print(counterTypes.UnJSON(JSON_Text))

statusOne = "`('Hi',  'I', 'am',  'Suresh')`"
print(type(counterTypes.UnJSON(statusOne)))
value1 = counter.lstOfInt
lst = [1, 4, 5, 4.5]
print(counterTypes.compareEachElement(value1, lst))
print(counter.reverse())

lst = ['1.2', '3', '9.0', '10', 'suresh', '18', 'Bool', 'True']
counter1 = counterTypes(lst)
counterOneData = counter1.numeriFy()
print(counterOneData)
counterTwoData = counterTypes(counterOneData)
print(counterTwoData.booliFy(condition=True, FalseKey=3))
print(counterTwoData.formatic(key=True))
print(counterTwoData.find(key=0))
print(counterTwoData.count(key=3))
print(counterTwoData.replace(re=3, key=10))
print(counterTwoData.remove(key=3))

lst = [[1,2, [3, 4], [10, 1], [10, [0, 9], [0, 8]], [90]]]
counterThreeData = counterTypes(lst)
print(counterThreeData.oneList())
print(counterTwoData.chunks(pair=3))

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

countertype_sp-0.1.5.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

countertype_sp-0.1.5-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file countertype_sp-0.1.5.tar.gz.

File metadata

  • Download URL: countertype_sp-0.1.5.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for countertype_sp-0.1.5.tar.gz
Algorithm Hash digest
SHA256 242754c141b38da2f4b0d3611ce889fa983fdaaf8f2b002e5efec63c2ccba7d4
MD5 188ceea6d0e6a445f4915235e3a604ca
BLAKE2b-256 d2d3558a0b79fd5164174be5f78ebe614f80008cdb7417e805cd0a3f703fb5c1

See more details on using hashes here.

File details

Details for the file countertype_sp-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: countertype_sp-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for countertype_sp-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 46a976437cb8f9e4182ee6a7398ec32ad96f5b1ede2faba8a495370d5df2e192
MD5 d590ad9b48ecc0d65d04ac8f7b75a5c3
BLAKE2b-256 157d6c5423b5c80fd36314f7469b46bc051f471a6fb65f0c528cf7e3708fa60e

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