Detail: Batch: Accessor Hashlib

Overview: Batch: Accessor Hashlib

Batch.via_hashlib(include_name, include_class, encoding).to_bytes()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.to_bytes()[source]

Return the byte signature for this container, suitable for passing to a cryptographic hash function.

>>> bt = sf.Batch((('i', sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x')), ('j', sf.Frame.from_fields(((10, 2, np.nan, 2), ('qrs ', 'XYZ', '', '123'), ('1517-01-01', '1517-04-01', 'NaT', '1517-04-01')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'))))
>>> bt
<Batch max_workers=None>
>>> bt.via_hashlib(include_name=False).to_bytes()
b'BusIndexi\x00\x00\x00j\x00\x00\x00FrameIndexp\x00\x00\x00q\x00\x00\x00r\x00\x00\x00Indexa\x00\x00\x00b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00FrameIndex\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00Indexa\x00\x00\x00b\x00\x00\x00c\x00\x00\x00\x00\x00\x00\x00\x00\x00$@\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\x00@q\x00\x00\x00r\x00\x00\x00s\x00\x00\x00 \x00\x00\x00X\x00\x00\x00Y\x00\x00\x00Z\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x001\x00\x00\x002\x00\x00\x003\x00\x00\x00\x00\x00\x00\x00\xb1y\xfd\xff\xff\xff\xff\xff\x0bz\xfd\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x80\x0bz\xfd\xff\xff\xff\xff\xff'
Batch.via_hashlib(include_name, include_class, encoding).md5()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.md5()[source]
>>> bt = sf.Batch((('i', sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x')), ('j', sf.Frame.from_fields(((10, 2, np.nan, 2), ('qrs ', 'XYZ', '', '123'), ('1517-01-01', '1517-04-01', 'NaT', '1517-04-01')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'))))
>>> bt
<Batch max_workers=None>
>>> bt.via_hashlib(include_name=False).md5().hexdigest()
7ffd9d64534f2922387fb8269bef6c2d
Batch.via_hashlib(include_name, include_class, encoding).sha256()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.sha256()[source]
>>> bt = sf.Batch((('i', sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x')), ('j', sf.Frame.from_fields(((10, 2, np.nan, 2), ('qrs ', 'XYZ', '', '123'), ('1517-01-01', '1517-04-01', 'NaT', '1517-04-01')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'))))
>>> bt
<Batch max_workers=None>
>>> bt.via_hashlib(include_name=False).sha256().hexdigest()
200ee75f3ff5757f261104c3d6d2f61e7099f197624d10bf3e1c345f680f0f79
Batch.via_hashlib(include_name, include_class, encoding).sha512()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.sha512()[source]
>>> bt = sf.Batch((('i', sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x')), ('j', sf.Frame.from_fields(((10, 2, np.nan, 2), ('qrs ', 'XYZ', '', '123'), ('1517-01-01', '1517-04-01', 'NaT', '1517-04-01')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'))))
>>> bt
<Batch max_workers=None>
>>> bt.via_hashlib(include_name=False).sha512().hexdigest()
a51fcd0e400a660dc7564a288b3e55e8cc630709782f19bd6e0e15449e6168ea74f1e0c0380fd241bbbb276a269329a2c901774832a797e765d00332465aec54
Batch.via_hashlib(include_name, include_class, encoding).sha3_256()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.sha3_256()[source]
>>> bt = sf.Batch((('i', sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x')), ('j', sf.Frame.from_fields(((10, 2, np.nan, 2), ('qrs ', 'XYZ', '', '123'), ('1517-01-01', '1517-04-01', 'NaT', '1517-04-01')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'))))
>>> bt
<Batch max_workers=None>
>>> bt.via_hashlib(include_name=False).sha3_256().hexdigest()
256f8e85282857b3a4cfbd6f58b1de4aceac8b904cd5e02c171704e84fe7dc35
Batch.via_hashlib(include_name, include_class, encoding).sha3_512()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.sha3_512()[source]
>>> bt = sf.Batch((('i', sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x')), ('j', sf.Frame.from_fields(((10, 2, np.nan, 2), ('qrs ', 'XYZ', '', '123'), ('1517-01-01', '1517-04-01', 'NaT', '1517-04-01')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'))))
>>> bt
<Batch max_workers=None>
>>> bt.via_hashlib(include_name=False).sha3_512().hexdigest()
2a26bdf5a953fc106d2636e0d10fe61eccae71e24eb15191ea86a8789050e8e3dc4f50e6d938fe28a573b633a70c3be43a657b8b30de9509256c553aa8509f80
Batch.via_hashlib(include_name, include_class, encoding).shake_128()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.shake_128()[source]
>>> bt = sf.Batch((('i', sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x')), ('j', sf.Frame.from_fields(((10, 2, np.nan, 2), ('qrs ', 'XYZ', '', '123'), ('1517-01-01', '1517-04-01', 'NaT', '1517-04-01')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'))))
>>> bt
<Batch max_workers=None>
>>> bt.via_hashlib(include_name=False).shake_128().hexdigest(8)
98266cfd62ebf881
Batch.via_hashlib(include_name, include_class, encoding).shake_256()
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.shake_256()[source]
>>> bt = sf.Batch((('i', sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x')), ('j', sf.Frame.from_fields(((10, 2, np.nan, 2), ('qrs ', 'XYZ', '', '123'), ('1517-01-01', '1517-04-01', 'NaT', '1517-04-01')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'))))
>>> bt
<Batch max_workers=None>
>>> bt.via_hashlib(include_name=False).shake_256().hexdigest(8)
0a27d5402daaa671
Batch.via_hashlib(include_name, include_class, encoding).blake2b(*, digest_size, key, salt, person, fanout, depth, leaf_size, node_offset, node_depth, inner_size, last_node)
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.blake2b(*, digest_size=64, key=b'', salt=b'', person=b'', fanout=1, depth=1, leaf_size=0, node_offset=0, node_depth=0, inner_size=0, last_node=False)[source]
>>> bt = sf.Batch((('i', sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x')), ('j', sf.Frame.from_fields(((10, 2, np.nan, 2), ('qrs ', 'XYZ', '', '123'), ('1517-01-01', '1517-04-01', 'NaT', '1517-04-01')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'))))
>>> bt
<Batch max_workers=None>
>>> bt.via_hashlib(include_name=False).blake2b().hexdigest()
bd38974d3c87f75d2c52915fabae71da18c6327e0f05b50a81ada90bf08a7be66012f28e9668c5564bd22cbd172a29cad87ad5afcb84fc5f9f3f0445a087ad0a
Batch.via_hashlib(include_name, include_class, encoding).blake2s(*, digest_size, key, salt, person, fanout, depth, leaf_size, node_offset, node_depth, inner_size, last_node)
via_hashlib

Interface for deriving cryptographic hashes from this container.

InterfaceHashlib.blake2s(*, digest_size=32, key=b'', salt=b'', person=b'', fanout=1, depth=1, leaf_size=0, node_offset=0, node_depth=0, inner_size=0, last_node=False)[source]
>>> bt = sf.Batch((('i', sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x')), ('j', sf.Frame.from_fields(((10, 2, np.nan, 2), ('qrs ', 'XYZ', '', '123'), ('1517-01-01', '1517-04-01', 'NaT', '1517-04-01')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x'))))
>>> bt
<Batch max_workers=None>
>>> bt.via_hashlib(include_name=False).blake2s().hexdigest()
c198734c0be11949dba314a5bc83a6cbbb5d825b0fc6ce792ecca024d9e88bc1

Batch: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Operator Binary | Operator Unary | Accessor Values | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Fill Value | Accessor Regular Expression | Accessor Hashlib | Accessor Type Clinic