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
Close
Hashes for spark_webdat_tools-0.3.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3310edfcc61c20efc42be4f68864387d0555e6f3dcfde522d7ec79a47eeed65 |
|
MD5 | 36153505dea17e6aa20d676bfd129064 |
|
BLAKE2b-256 | a547936c2fd70226aea9c08fd6d4be4d12bb4008eeecb32952b1b22bc12a8bc4 |