spark_webdat_tools
Project description
spark_webdat_tools
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:
pip install spark-webdat-tools --user --upgrade
Usage
import spark_webdat_tools
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
df_pandas = df.toPandas()
df_pandas.show2()
Spark
# Dataframe template table
df.show2()
# Dataframe memory usage
df.size()
License
New features v1.0
BugFix
- choco install visualcpp-build-tools
Reference
- Jonathan Quiza github.
- Jonathan Quiza RumiMLSpark.
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 spark_webdat_tools-0.3.9.tar.gz
.
File metadata
- Download URL: spark_webdat_tools-0.3.9.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 263ac23eeee592eb2d420027416e2200571cc09d36d8faf389526a054318e6d8 |
|
MD5 | a8f7832e50a42037620ce2149abc886a |
|
BLAKE2b-256 | ea298763c6916840ea4f8ce922fb8b1ebef73fb09ff04fab4adbe2ac0632ba30 |
File details
Details for the file spark_webdat_tools-0.3.9-py3-none-any.whl
.
File metadata
- Download URL: spark_webdat_tools-0.3.9-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e564e32f9680a145800549e650516336c05f3a31bd99f92d73de3a926d64ad90 |
|
MD5 | 4835cafed2926fc8c388169b31e577a1 |
|
BLAKE2b-256 | a2d349fad6c030c34be63a91069f34a3ac173894aa57d065f262821736281f1c |