spark-webdat-tools


Namespark-webdat-tools JSON
Version 0.3.8 PyPI version JSON
download
home_pagehttps://github.com/jonaqp/spark_webdat_tools/
Summaryspark_webdat_tools
upload_time2024-02-11 06:42:58
maintainer
docs_urlNone
authorJonathan Quiza
requires_python
license
keywords spark repository dataproc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # spark_webdat_tools

[![Github License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Updates](https://pyup.io/repos/github/woctezuma/google-colab-transfer/shield.svg)](pyup)
[![Python 3](https://pyup.io/repos/github/woctezuma/google-colab-transfer/python-3-shield.svg)](pyup)
[![Code coverage](https://codecov.io/gh/woctezuma/google-colab-transfer/branch/master/graph/badge.svg)](codecov)

spark_webdat_tools is a Python library that implements styles in the Dataframe

## Installation

The code is packaged for PyPI, so that the installation consists in running:

```sh
pip install spark-webdat-tools --user --upgrade
```

## Usage
```sh
import spark_webdat_tools 
```

```sh
from pyspark.sql.types import StructType,StructField, StringType, IntegerType
data2 = [("James","","Smith","36636","M",3000),
    ("Michael","Rose","","40288","M",4000),
    ("Robert","","Williams","42114","M",4000),
    ("Maria","Anne","Jones","39192","F",4000),
    ("Jen","Mary","Brown","","F",-1)
  ]

schema = StructType([ \
    StructField("firstname",StringType(),True), \
    StructField("middlename",StringType(),True), \
    StructField("lastname",StringType(),True), \
    StructField("id", StringType(), True), \
    StructField("gender", StringType(), True), \
    StructField("salary", IntegerType(), True) \
  ])
 
df = spark.createDataFrame(data=data2, schema=schema)
```

## Pandas

```sh
df_pandas = df.toPandas()
df_pandas.show2()
```

## Spark

```sh
# Dataframe template table
df.show2()

# Dataframe memory usage
df.size()
```



## License

[Apache License 2.0](https://www.dropbox.com/s/8t6xtgk06o3ij61/LICENSE?dl=0).

## New features v1.0

## BugFix

- choco install visualcpp-build-tools

## Reference

- Jonathan Quiza [github](https://github.com/jonaqp).
- Jonathan Quiza [RumiMLSpark](http://rumi-ml.herokuapp.com/).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jonaqp/spark_webdat_tools/",
    "name": "spark-webdat-tools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "spark,repository,dataproc",
    "author": "Jonathan Quiza",
    "author_email": "jony327@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/bc/f4/b3fde91df59c7c108a256f73c11af4612cb9a9f215250fb9b7eb5ea5b685/spark_webdat_tools-0.3.8.tar.gz",
    "platform": null,
    "description": "# spark_webdat_tools\r\n\r\n[![Github License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\r\n[![Updates](https://pyup.io/repos/github/woctezuma/google-colab-transfer/shield.svg)](pyup)\r\n[![Python 3](https://pyup.io/repos/github/woctezuma/google-colab-transfer/python-3-shield.svg)](pyup)\r\n[![Code coverage](https://codecov.io/gh/woctezuma/google-colab-transfer/branch/master/graph/badge.svg)](codecov)\r\n\r\nspark_webdat_tools is a Python library that implements styles in the Dataframe\r\n\r\n## Installation\r\n\r\nThe code is packaged for PyPI, so that the installation consists in running:\r\n\r\n```sh\r\npip install spark-webdat-tools --user --upgrade\r\n```\r\n\r\n## Usage\r\n```sh\r\nimport spark_webdat_tools \r\n```\r\n\r\n```sh\r\nfrom pyspark.sql.types import StructType,StructField, StringType, IntegerType\r\ndata2 = [(\"James\",\"\",\"Smith\",\"36636\",\"M\",3000),\r\n    (\"Michael\",\"Rose\",\"\",\"40288\",\"M\",4000),\r\n    (\"Robert\",\"\",\"Williams\",\"42114\",\"M\",4000),\r\n    (\"Maria\",\"Anne\",\"Jones\",\"39192\",\"F\",4000),\r\n    (\"Jen\",\"Mary\",\"Brown\",\"\",\"F\",-1)\r\n  ]\r\n\r\nschema = StructType([ \\\r\n    StructField(\"firstname\",StringType(),True), \\\r\n    StructField(\"middlename\",StringType(),True), \\\r\n    StructField(\"lastname\",StringType(),True), \\\r\n    StructField(\"id\", StringType(), True), \\\r\n    StructField(\"gender\", StringType(), True), \\\r\n    StructField(\"salary\", IntegerType(), True) \\\r\n  ])\r\n \r\ndf = spark.createDataFrame(data=data2, schema=schema)\r\n```\r\n\r\n## Pandas\r\n\r\n```sh\r\ndf_pandas = df.toPandas()\r\ndf_pandas.show2()\r\n```\r\n\r\n## Spark\r\n\r\n```sh\r\n# Dataframe template table\r\ndf.show2()\r\n\r\n# Dataframe memory usage\r\ndf.size()\r\n```\r\n\r\n\r\n\r\n## License\r\n\r\n[Apache License 2.0](https://www.dropbox.com/s/8t6xtgk06o3ij61/LICENSE?dl=0).\r\n\r\n## New features v1.0\r\n\r\n## BugFix\r\n\r\n- choco install visualcpp-build-tools\r\n\r\n## Reference\r\n\r\n- Jonathan Quiza [github](https://github.com/jonaqp).\r\n- Jonathan Quiza [RumiMLSpark](http://rumi-ml.herokuapp.com/).\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "spark_webdat_tools",
    "version": "0.3.8",
    "project_urls": {
        "Download": "https://github.com/jonaqp/spark_webdat_tools/archive/main.zip",
        "Homepage": "https://github.com/jonaqp/spark_webdat_tools/"
    },
    "split_keywords": [
        "spark",
        "repository",
        "dataproc"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "82a32e58053e78e0d6346ff42a0d049718ef284a3dc57f5efe1deaceafce0aff",
                "md5": "faf96855374cc7cc20b4b6847619f7c9",
                "sha256": "96a65c9160eec4483b895737c47149d05306139ce21f742fa10ceb00f8235f52"
            },
            "downloads": -1,
            "filename": "spark_webdat_tools-0.3.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "faf96855374cc7cc20b4b6847619f7c9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 8529,
            "upload_time": "2024-02-11T06:42:56",
            "upload_time_iso_8601": "2024-02-11T06:42:56.590235Z",
            "url": "https://files.pythonhosted.org/packages/82/a3/2e58053e78e0d6346ff42a0d049718ef284a3dc57f5efe1deaceafce0aff/spark_webdat_tools-0.3.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bcf4b3fde91df59c7c108a256f73c11af4612cb9a9f215250fb9b7eb5ea5b685",
                "md5": "8be5c38742431f52e69b70b0a171291c",
                "sha256": "934ac70af1f0564d072b32fd22da95f461d831b084e8f4ae7a566ca48befc953"
            },
            "downloads": -1,
            "filename": "spark_webdat_tools-0.3.8.tar.gz",
            "has_sig": false,
            "md5_digest": "8be5c38742431f52e69b70b0a171291c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8744,
            "upload_time": "2024-02-11T06:42:58",
            "upload_time_iso_8601": "2024-02-11T06:42:58.275719Z",
            "url": "https://files.pythonhosted.org/packages/bc/f4/b3fde91df59c7c108a256f73c11af4612cb9a9f215250fb9b7eb5ea5b685/spark_webdat_tools-0.3.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-11 06:42:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jonaqp",
    "github_project": "spark_webdat_tools",
    "github_not_found": true,
    "lcname": "spark-webdat-tools"
}
        
Elapsed time: 0.40919s