dfjoinseries


Namedfjoinseries JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/dfjoinseries
SummaryLike numpy.char.join for DataFrames
upload_time2024-02-02 06:49:21
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords join dataframes
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Like numpy.char.join for DataFrames
 
## Tested against Windows / Python 3.11 / Anaconda

## pip install dfjoinseries

```
import pandas as pd
from dfjoinseries import pd_add_str_tools
pd_add_str_tools()
df = pd.read_csv(
    "https://raw.githubusercontent.com/pandas-dev/pandas/main/doc/data/titanic.csv"
)

df2 = df.d_to_str()
df3 = df.d_to_repr()
df4 = df2.d_join(sep=" --- ")
df5 = df3.d_join()
print(df)
print(df2)
print(df3)
print(df4)
print(df5)

#      PassengerId  Survived  Pclass                                               Name     Sex   Age  SibSp  Parch            Ticket     Fare Cabin Embarked
# 0              1         0       3                            Braund, Mr. Owen Harris    male  22.0      1      0         A/5 21171   7.2500   NaN        S
# 1              2         1       1  Cumings, Mrs. John Bradley (Florence Briggs Th...  female  38.0      1      0          PC 17599  71.2833   C85        C
# 2              3         1       3                             Heikkinen, Miss. Laina  female  26.0      0      0  STON/O2. 3101282   7.9250   NaN        S
# 3              4         1       1       Futrelle, Mrs. Jacques Heath (Lily May Peel)  female  35.0      1      0            113803  53.1000  C123        S
# 4              5         0       3                           Allen, Mr. William Henry    male  35.0      0      0            373450   8.0500   NaN        S
# ..           ...       ...     ...                                                ...     ...   ...    ...    ...               ...      ...   ...      ...
# 886          887         0       2                              Montvila, Rev. Juozas    male  27.0      0      0            211536  13.0000   NaN        S
# 887          888         1       1                       Graham, Miss. Margaret Edith  female  19.0      0      0            112053  30.0000   B42        S
# 888          889         0       3           Johnston, Miss. Catherine Helen "Carrie"  female   NaN      1      2        W./C. 6607  23.4500   NaN        S
# 889          890         1       1                              Behr, Mr. Karl Howell    male  26.0      0      0            111369  30.0000  C148        C
# 890          891         0       3                                Dooley, Mr. Patrick    male  32.0      0      0            370376   7.7500   NaN        Q

# [891 rows x 12 columns]
#     PassengerId Survived Pclass                                               Name     Sex   Age SibSp Parch            Ticket     Fare Cabin Embarked
# 0             1        0      3                            Braund, Mr. Owen Harris    male  22.0     1     0         A/5 21171     7.25   nan        S
# 1             2        1      1  Cumings, Mrs. John Bradley (Florence Briggs Th...  female  38.0     1     0          PC 17599  71.2833   C85        C
# 2             3        1      3                             Heikkinen, Miss. Laina  female  26.0     0     0  STON/O2. 3101282    7.925   nan        S
# 3             4        1      1       Futrelle, Mrs. Jacques Heath (Lily May Peel)  female  35.0     1     0            113803     53.1  C123        S
# 4             5        0      3                           Allen, Mr. William Henry    male  35.0     0     0            373450     8.05   nan        S
# ..          ...      ...    ...                                                ...     ...   ...   ...   ...               ...      ...   ...      ...
# 886         887        0      2                              Montvila, Rev. Juozas    male  27.0     0     0            211536     13.0   nan        S
# 887         888        1      1                       Graham, Miss. Margaret Edith  female  19.0     0     0            112053     30.0   B42        S
# 888         889        0      3           Johnston, Miss. Catherine Helen "Carrie"  female   nan     1     2        W./C. 6607    23.45   nan        S
# 889         890        1      1                              Behr, Mr. Karl Howell    male  26.0     0     0            111369     30.0  C148        C
# 890         891        0      3                                Dooley, Mr. Patrick    male  32.0     0     0            370376     7.75   nan        Q

# [891 rows x 12 columns]
#     PassengerId Survived Pclass                                               Name       Sex   Age SibSp Parch              Ticket     Fare   Cabin Embarked
# 0             1        0      3                          'Braund, Mr. Owen Harris'    'male'  22.0     1     0         'A/5 21171'     7.25     nan      'S'
# 1             2        1      1  'Cumings, Mrs. John Bradley (Florence Briggs T...  'female'  38.0     1     0          'PC 17599'  71.2833   'C85'      'C'
# 2             3        1      3                           'Heikkinen, Miss. Laina'  'female'  26.0     0     0  'STON/O2. 3101282'    7.925     nan      'S'
# 3             4        1      1     'Futrelle, Mrs. Jacques Heath (Lily May Peel)'  'female'  35.0     1     0            '113803'     53.1  'C123'      'S'
# 4             5        0      3                         'Allen, Mr. William Henry'    'male'  35.0     0     0            '373450'     8.05     nan      'S'
# ..          ...      ...    ...                                                ...       ...   ...   ...   ...                 ...      ...     ...      ...
# 886         887        0      2                            'Montvila, Rev. Juozas'    'male'  27.0     0     0            '211536'     13.0     nan      'S'
# 887         888        1      1                     'Graham, Miss. Margaret Edith'  'female'  19.0     0     0            '112053'     30.0   'B42'      'S'
# 888         889        0      3         'Johnston, Miss. Catherine Helen "Carrie"'  'female'   nan     1     2        'W./C. 6607'    23.45     nan      'S'
# 889         890        1      1                            'Behr, Mr. Karl Howell'    'male'  26.0     0     0            '111369'     30.0  'C148'      'C'
# 890         891        0      3                              'Dooley, Mr. Patrick'    'male'  32.0     0     0            '370376'     7.75     nan      'Q'

# [891 rows x 12 columns]
# 0      1 --- 0 --- 3 --- Braund, Mr. Owen Harris --- ...
# 1      2 --- 1 --- 1 --- Cumings, Mrs. John Bradley (...
# 2      3 --- 1 --- 3 --- Heikkinen, Miss. Laina --- f...
# 3      4 --- 1 --- 1 --- Futrelle, Mrs. Jacques Heath...
# 4      5 --- 0 --- 3 --- Allen, Mr. William Henry ---...
#                              ...
# 886    887 --- 0 --- 2 --- Montvila, Rev. Juozas --- ...
# 887    888 --- 1 --- 1 --- Graham, Miss. Margaret Edi...
# 888    889 --- 0 --- 3 --- Johnston, Miss. Catherine ...
# 889    890 --- 1 --- 1 --- Behr, Mr. Karl Howell --- ...
# 890    891 --- 0 --- 3 --- Dooley, Mr. Patrick --- ma...
# Length: 891, dtype: object
# 0      103'Braund, Mr. Owen Harris''male'22.010'A/5 2...
# 1      211'Cumings, Mrs. John Bradley (Florence Brigg...
# 2      313'Heikkinen, Miss. Laina''female'26.000'STON...
# 3      411'Futrelle, Mrs. Jacques Heath (Lily May Pee...
# 4      503'Allen, Mr. William Henry''male'35.000'3734...
#                              ...
# 886    88702'Montvila, Rev. Juozas''male'27.000'21153...
# 887    88811'Graham, Miss. Margaret Edith''female'19....
# 888    88903'Johnston, Miss. Catherine Helen "Carrie"...
# 889    89011'Behr, Mr. Karl Howell''male'26.000'11136...
# 890    89103'Dooley, Mr. Patrick''male'32.000'370376'...
# Length: 891, dtype: object


```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/dfjoinseries",
    "name": "dfjoinseries",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "join,DataFrames",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/19/bb/64640ea430515ba9873b93bae509d409e7eda8a024ea532b8a39b4fffd39/dfjoinseries-0.10.tar.gz",
    "platform": null,
    "description": "\r\n# Like numpy.char.join for DataFrames\r\n \r\n## Tested against Windows / Python 3.11 / Anaconda\r\n\r\n## pip install dfjoinseries\r\n\r\n```\r\nimport pandas as pd\r\nfrom dfjoinseries import pd_add_str_tools\r\npd_add_str_tools()\r\ndf = pd.read_csv(\r\n    \"https://raw.githubusercontent.com/pandas-dev/pandas/main/doc/data/titanic.csv\"\r\n)\r\n\r\ndf2 = df.d_to_str()\r\ndf3 = df.d_to_repr()\r\ndf4 = df2.d_join(sep=\" --- \")\r\ndf5 = df3.d_join()\r\nprint(df)\r\nprint(df2)\r\nprint(df3)\r\nprint(df4)\r\nprint(df5)\r\n\r\n#      PassengerId  Survived  Pclass                                               Name     Sex   Age  SibSp  Parch            Ticket     Fare Cabin Embarked\r\n# 0              1         0       3                            Braund, Mr. Owen Harris    male  22.0      1      0         A/5 21171   7.2500   NaN        S\r\n# 1              2         1       1  Cumings, Mrs. John Bradley (Florence Briggs Th...  female  38.0      1      0          PC 17599  71.2833   C85        C\r\n# 2              3         1       3                             Heikkinen, Miss. Laina  female  26.0      0      0  STON/O2. 3101282   7.9250   NaN        S\r\n# 3              4         1       1       Futrelle, Mrs. Jacques Heath (Lily May Peel)  female  35.0      1      0            113803  53.1000  C123        S\r\n# 4              5         0       3                           Allen, Mr. William Henry    male  35.0      0      0            373450   8.0500   NaN        S\r\n# ..           ...       ...     ...                                                ...     ...   ...    ...    ...               ...      ...   ...      ...\r\n# 886          887         0       2                              Montvila, Rev. Juozas    male  27.0      0      0            211536  13.0000   NaN        S\r\n# 887          888         1       1                       Graham, Miss. Margaret Edith  female  19.0      0      0            112053  30.0000   B42        S\r\n# 888          889         0       3           Johnston, Miss. Catherine Helen \"Carrie\"  female   NaN      1      2        W./C. 6607  23.4500   NaN        S\r\n# 889          890         1       1                              Behr, Mr. Karl Howell    male  26.0      0      0            111369  30.0000  C148        C\r\n# 890          891         0       3                                Dooley, Mr. Patrick    male  32.0      0      0            370376   7.7500   NaN        Q\r\n\r\n# [891 rows x 12 columns]\r\n#     PassengerId Survived Pclass                                               Name     Sex   Age SibSp Parch            Ticket     Fare Cabin Embarked\r\n# 0             1        0      3                            Braund, Mr. Owen Harris    male  22.0     1     0         A/5 21171     7.25   nan        S\r\n# 1             2        1      1  Cumings, Mrs. John Bradley (Florence Briggs Th...  female  38.0     1     0          PC 17599  71.2833   C85        C\r\n# 2             3        1      3                             Heikkinen, Miss. Laina  female  26.0     0     0  STON/O2. 3101282    7.925   nan        S\r\n# 3             4        1      1       Futrelle, Mrs. Jacques Heath (Lily May Peel)  female  35.0     1     0            113803     53.1  C123        S\r\n# 4             5        0      3                           Allen, Mr. William Henry    male  35.0     0     0            373450     8.05   nan        S\r\n# ..          ...      ...    ...                                                ...     ...   ...   ...   ...               ...      ...   ...      ...\r\n# 886         887        0      2                              Montvila, Rev. Juozas    male  27.0     0     0            211536     13.0   nan        S\r\n# 887         888        1      1                       Graham, Miss. Margaret Edith  female  19.0     0     0            112053     30.0   B42        S\r\n# 888         889        0      3           Johnston, Miss. Catherine Helen \"Carrie\"  female   nan     1     2        W./C. 6607    23.45   nan        S\r\n# 889         890        1      1                              Behr, Mr. Karl Howell    male  26.0     0     0            111369     30.0  C148        C\r\n# 890         891        0      3                                Dooley, Mr. Patrick    male  32.0     0     0            370376     7.75   nan        Q\r\n\r\n# [891 rows x 12 columns]\r\n#     PassengerId Survived Pclass                                               Name       Sex   Age SibSp Parch              Ticket     Fare   Cabin Embarked\r\n# 0             1        0      3                          'Braund, Mr. Owen Harris'    'male'  22.0     1     0         'A/5 21171'     7.25     nan      'S'\r\n# 1             2        1      1  'Cumings, Mrs. John Bradley (Florence Briggs T...  'female'  38.0     1     0          'PC 17599'  71.2833   'C85'      'C'\r\n# 2             3        1      3                           'Heikkinen, Miss. Laina'  'female'  26.0     0     0  'STON/O2. 3101282'    7.925     nan      'S'\r\n# 3             4        1      1     'Futrelle, Mrs. Jacques Heath (Lily May Peel)'  'female'  35.0     1     0            '113803'     53.1  'C123'      'S'\r\n# 4             5        0      3                         'Allen, Mr. William Henry'    'male'  35.0     0     0            '373450'     8.05     nan      'S'\r\n# ..          ...      ...    ...                                                ...       ...   ...   ...   ...                 ...      ...     ...      ...\r\n# 886         887        0      2                            'Montvila, Rev. Juozas'    'male'  27.0     0     0            '211536'     13.0     nan      'S'\r\n# 887         888        1      1                     'Graham, Miss. Margaret Edith'  'female'  19.0     0     0            '112053'     30.0   'B42'      'S'\r\n# 888         889        0      3         'Johnston, Miss. Catherine Helen \"Carrie\"'  'female'   nan     1     2        'W./C. 6607'    23.45     nan      'S'\r\n# 889         890        1      1                            'Behr, Mr. Karl Howell'    'male'  26.0     0     0            '111369'     30.0  'C148'      'C'\r\n# 890         891        0      3                              'Dooley, Mr. Patrick'    'male'  32.0     0     0            '370376'     7.75     nan      'Q'\r\n\r\n# [891 rows x 12 columns]\r\n# 0      1 --- 0 --- 3 --- Braund, Mr. Owen Harris --- ...\r\n# 1      2 --- 1 --- 1 --- Cumings, Mrs. John Bradley (...\r\n# 2      3 --- 1 --- 3 --- Heikkinen, Miss. Laina --- f...\r\n# 3      4 --- 1 --- 1 --- Futrelle, Mrs. Jacques Heath...\r\n# 4      5 --- 0 --- 3 --- Allen, Mr. William Henry ---...\r\n#                              ...\r\n# 886    887 --- 0 --- 2 --- Montvila, Rev. Juozas --- ...\r\n# 887    888 --- 1 --- 1 --- Graham, Miss. Margaret Edi...\r\n# 888    889 --- 0 --- 3 --- Johnston, Miss. Catherine ...\r\n# 889    890 --- 1 --- 1 --- Behr, Mr. Karl Howell --- ...\r\n# 890    891 --- 0 --- 3 --- Dooley, Mr. Patrick --- ma...\r\n# Length: 891, dtype: object\r\n# 0      103'Braund, Mr. Owen Harris''male'22.010'A/5 2...\r\n# 1      211'Cumings, Mrs. John Bradley (Florence Brigg...\r\n# 2      313'Heikkinen, Miss. Laina''female'26.000'STON...\r\n# 3      411'Futrelle, Mrs. Jacques Heath (Lily May Pee...\r\n# 4      503'Allen, Mr. William Henry''male'35.000'3734...\r\n#                              ...\r\n# 886    88702'Montvila, Rev. Juozas''male'27.000'21153...\r\n# 887    88811'Graham, Miss. Margaret Edith''female'19....\r\n# 888    88903'Johnston, Miss. Catherine Helen \"Carrie\"...\r\n# 889    89011'Behr, Mr. Karl Howell''male'26.000'11136...\r\n# 890    89103'Dooley, Mr. Patrick''male'32.000'370376'...\r\n# Length: 891, dtype: object\r\n\r\n\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Like numpy.char.join for DataFrames",
    "version": "0.10",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/dfjoinseries"
    },
    "split_keywords": [
        "join",
        "dataframes"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "275ac315a044948d45429d14b30d75d8fedc3411f82a03f41628b98fccec6833",
                "md5": "6122d1c766868ceef8d6db83b66f8b63",
                "sha256": "a8bc12d095d77755bd8c3275dc8aa46f18751d8b02e0bb88106a263470261389"
            },
            "downloads": -1,
            "filename": "dfjoinseries-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6122d1c766868ceef8d6db83b66f8b63",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 22995,
            "upload_time": "2024-02-02T06:49:20",
            "upload_time_iso_8601": "2024-02-02T06:49:20.406648Z",
            "url": "https://files.pythonhosted.org/packages/27/5a/c315a044948d45429d14b30d75d8fedc3411f82a03f41628b98fccec6833/dfjoinseries-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "19bb64640ea430515ba9873b93bae509d409e7eda8a024ea532b8a39b4fffd39",
                "md5": "f0811fab828755e9210039fa71288966",
                "sha256": "ca3f6d3eb521835e9ca59d3d1f6bfb9eec178de78344628987384ccf3a945c69"
            },
            "downloads": -1,
            "filename": "dfjoinseries-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "f0811fab828755e9210039fa71288966",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 23227,
            "upload_time": "2024-02-02T06:49:21",
            "upload_time_iso_8601": "2024-02-02T06:49:21.985727Z",
            "url": "https://files.pythonhosted.org/packages/19/bb/64640ea430515ba9873b93bae509d409e7eda8a024ea532b8a39b4fffd39/dfjoinseries-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-02 06:49:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "dfjoinseries",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "dfjoinseries"
}
        
Elapsed time: 0.20995s