a-pandas-ex-combinatoric-iterators-to-df


Namea-pandas-ex-combinatoric-iterators-to-df JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/a_pandas_ex_combinatoric_iterators_to_df
SummaryCreates DataFrames from product, permutations, combinations, combinations_with_replacement with best dtype
upload_time2023-01-06 04:00:02
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords pandas permutations product
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Creates DataFrames from product, permutations, combinations, combinations_with_replacement with best dtype

```python
# 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]

"""



```




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/a_pandas_ex_combinatoric_iterators_to_df",
    "name": "a-pandas-ex-combinatoric-iterators-to-df",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "pandas,permutations,product",
    "author": "Johannes Fischer",
    "author_email": "<aulasparticularesdealemaosp@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b6/31/dc3bbcd34ed1b41dc3816978c5bd8835568979b96c6a726fc1b3c8c62e03/a_pandas_ex_combinatoric_iterators_to_df-0.10.tar.gz",
    "platform": null,
    "description": "\n# Creates DataFrames from product, permutations, combinations, combinations_with_replacement with best dtype\n\n```python\n# Tested with:\n# Python 3.9.13\n# Windows 10\n\npip install a-pandas-ex-combinatoric-iterators-to-df\n\n\nfrom a_pandas_ex_combinatoric_iterators_to_df import pd_add_combinatoric_iterators_to_df\nimport pandas as pd\npd_add_combinatoric_iterators_to_df()\n\ndf1=pd.Q_product_to_df(iterable=list(range(256)), n=3)\ndf1\nOut[3]: \n\n            0    1    2\n0           0    0    0\n1           0    0    1\n2           0    0    2\n3           0    0    3\n4           0    0    4\n       ...  ...  ...\n16777211  255  255  251\n16777212  255  255  252\n16777213  255  255  253\n16777214  255  255  254\n16777215  255  255  255\n[16777216 rows x 3 columns]\n\ndf1.dtypes\nOut[4]: \n0    uint8\n1    uint8\n2    uint8\ndtype: object\n\n\ndf2=pd.Q_permutations_to_df(iterable=list(range(256)), n=3)\ndf2\nOut[5]: \n            0    1    2\n0           0    1    2\n1           0    1    3\n2           0    1    4\n3           0    1    5\n4           0    1    6\n       ...  ...  ...\n16581115  255  254  249\n16581116  255  254  250\n16581117  255  254  251\n16581118  255  254  252\n16581119  255  254  253\n[16581120 rows x 3 columns]\n\n\ndf3=pd.Q_combinations_to_df(iterable=list(range(256)), n=3)\ndf3\nOut[6]: \n           0    1    2\n0          0    1    2\n1          0    1    3\n2          0    1    4\n3          0    1    5\n4          0    1    6\n      ...  ...  ...\n2763515  251  254  255\n2763516  252  253  254\n2763517  252  253  255\n2763518  252  254  255\n2763519  253  254  255\n[2763520 rows x 3 columns]\n\ndf4=pd.Q_combinations_with_replacement_to_df(iterable=list(range(256)), n=3)\ndf4\nOut[7]: \n           0    1    2\n0          0    0    0\n1          0    0    1\n2          0    0    2\n3          0    0    3\n4          0    0    4\n      ...  ...  ...\n2829051  253  255  255\n2829052  254  254  254\n2829053  254  254  255\n2829054  254  255  255\n2829055  255  255  255\n[2829056 rows x 3 columns]\n\n\"\"\"\n\n\n\n```\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Creates DataFrames from product, permutations, combinations, combinations_with_replacement with best dtype",
    "version": "0.10",
    "split_keywords": [
        "pandas",
        "permutations",
        "product"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "73d55b6082411ff0ad9638696e7363143aa3a0edcd1d16e2e549d4d94672a6fb",
                "md5": "51b2395b97a3d1696846a03dd460a9c3",
                "sha256": "fe241f0e0a5b4d9c5c70b4fd21f0ab4a3cfd45cdaa55e628b2d332cfe1a52747"
            },
            "downloads": -1,
            "filename": "a_pandas_ex_combinatoric_iterators_to_df-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "51b2395b97a3d1696846a03dd460a9c3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5932,
            "upload_time": "2023-01-06T04:00:00",
            "upload_time_iso_8601": "2023-01-06T04:00:00.631773Z",
            "url": "https://files.pythonhosted.org/packages/73/d5/5b6082411ff0ad9638696e7363143aa3a0edcd1d16e2e549d4d94672a6fb/a_pandas_ex_combinatoric_iterators_to_df-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b631dc3bbcd34ed1b41dc3816978c5bd8835568979b96c6a726fc1b3c8c62e03",
                "md5": "3a68e6f13b0b5a70f2954ddc165a2662",
                "sha256": "edbbeee1b43e27aa99473b1094d4bbe2030b8246e15ce322b57fd04ffb6e13e9"
            },
            "downloads": -1,
            "filename": "a_pandas_ex_combinatoric_iterators_to_df-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "3a68e6f13b0b5a70f2954ddc165a2662",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4116,
            "upload_time": "2023-01-06T04:00:02",
            "upload_time_iso_8601": "2023-01-06T04:00:02.448430Z",
            "url": "https://files.pythonhosted.org/packages/b6/31/dc3bbcd34ed1b41dc3816978c5bd8835568979b96c6a726fc1b3c8c62e03/a_pandas_ex_combinatoric_iterators_to_df-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-06 04:00:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "hansalemaos",
    "github_project": "a_pandas_ex_combinatoric_iterators_to_df",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "a-pandas-ex-combinatoric-iterators-to-df"
}
        
Elapsed time: 0.02480s