Creates DataFrames from product, permutations, combinations, combinations_with_replacement with best dtype
Project description
Creates DataFrames from product, permutations, combinations, combinations_with_replacement with best dtype
# Tested with:
# Python 3.9.13
# Windows 10
pip install a-pandas-ex-combinatoric-iterators-to-df
from a_pandas_ex_combinatoric_iterators_to_df import pd_add_combinatoric_iterators_to_df
import pandas as pd
pd_add_combinatoric_iterators_to_df()
df1=pd.Q_product_to_df(iterable=list(range(256)), n=3)
df1
Out[3]:
0 1 2
0 0 0 0
1 0 0 1
2 0 0 2
3 0 0 3
4 0 0 4
... ... ...
16777211 255 255 251
16777212 255 255 252
16777213 255 255 253
16777214 255 255 254
16777215 255 255 255
[16777216 rows x 3 columns]
df1.dtypes
Out[4]:
0 uint8
1 uint8
2 uint8
dtype: object
df2=pd.Q_permutations_to_df(iterable=list(range(256)), n=3)
df2
Out[5]:
0 1 2
0 0 1 2
1 0 1 3
2 0 1 4
3 0 1 5
4 0 1 6
... ... ...
16581115 255 254 249
16581116 255 254 250
16581117 255 254 251
16581118 255 254 252
16581119 255 254 253
[16581120 rows x 3 columns]
df3=pd.Q_combinations_to_df(iterable=list(range(256)), n=3)
df3
Out[6]:
0 1 2
0 0 1 2
1 0 1 3
2 0 1 4
3 0 1 5
4 0 1 6
... ... ...
2763515 251 254 255
2763516 252 253 254
2763517 252 253 255
2763518 252 254 255
2763519 253 254 255
[2763520 rows x 3 columns]
df4=pd.Q_combinations_with_replacement_to_df(iterable=list(range(256)), n=3)
df4
Out[7]:
0 1 2
0 0 0 0
1 0 0 1
2 0 0 2
3 0 0 3
4 0 0 4
... ... ...
2829051 253 255 255
2829052 254 254 254
2829053 254 254 255
2829054 254 255 255
2829055 255 255 255
[2829056 rows x 3 columns]
"""
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
Built Distribution
File details
Details for the file a_pandas_ex_combinatoric_iterators_to_df-0.10.tar.gz
.
File metadata
- Download URL: a_pandas_ex_combinatoric_iterators_to_df-0.10.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | edbbeee1b43e27aa99473b1094d4bbe2030b8246e15ce322b57fd04ffb6e13e9 |
|
MD5 | 3a68e6f13b0b5a70f2954ddc165a2662 |
|
BLAKE2b-256 | b631dc3bbcd34ed1b41dc3816978c5bd8835568979b96c6a726fc1b3c8c62e03 |
File details
Details for the file a_pandas_ex_combinatoric_iterators_to_df-0.10-py3-none-any.whl
.
File metadata
- Download URL: a_pandas_ex_combinatoric_iterators_to_df-0.10-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe241f0e0a5b4d9c5c70b4fd21f0ab4a3cfd45cdaa55e628b2d332cfe1a52747 |
|
MD5 | 51b2395b97a3d1696846a03dd460a9c3 |
|
BLAKE2b-256 | 73d55b6082411ff0ad9638696e7363143aa3a0edcd1d16e2e549d4d94672a6fb |