group of tools for data process
Project description
zeroinger
一些可以加速的python编码的常用轮子
StopWatch
from zeroinger.time.stopwatch import StopWatch
import time
timer = StopWatch.create_instance()
time.sleep(1)
print(timer.snapshot())
time.sleep(1)
print(timer.duriation())
timer.reset()
time.sleep(1)
print(timer.duriation())
pass
#--------------------------------
1000
2002
1003
XLSX
读取excel
from zeroinger.excel.xlsx import XLSX
test_read_file_path = os.path.join(os.path.dirname(__file__), 'read_test_file.xlsx')
data = XLSX.read_dict_sheet(test_read_file_path, 0)
print(data)
#--------------
[{'列1': 1, '列2': 4, '列3': 7}, {'列1': 2, '列2': 5, '列3': 8}, {'列1': 3, '列2': 6, '列3': 9}]
写入excel
from zeroinger.excel.xlsx import XLSX
golden = [{'列1': 1, '列2': 4, '列3': 7}, {'列1': 2, '列2': 5, '列3': 8}, {'列1': 3, '列2': 6, '列3': 9}]
test_write_file_path = os.path.join(os.path.dirname(__file__), 'write_test_file.xlsx')
XLSX.write_dict_sheet(test_write_file_path, golden)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zeroinger-1.0.3.tar.gz
(7.6 kB
view hashes)
Built Distribution
zeroinger-1.0.3-py3-none-any.whl
(12.8 kB
view hashes)
Close
Hashes for zeroinger-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f4414ae1d89eb35f7bb00c2ed5d752151112f09270274eadfbc2805296430a2 |
|
MD5 | 8013fec0436cd47fc0532ec10771205a |
|
BLAKE2b-256 | 1da8596d0af2d790bbf2e5ebc95709b5e1e1714cbcdbfeb2d1a34ed203f44374 |