spark_dataframe_tools
Project description
spark_dataframe_tools
spark_dataframe_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-dataframe-tools --user --upgrade
Usage
import spark_dataframe_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_dataframe_tools-0.6.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c15c616029817a8e625bf35c69ebe2686d5d9866d3d14b5c65d78b7648804c6 |
|
MD5 | 667d0ea2a78547ce61bebd701114aa65 |
|
BLAKE2b-256 | 376ac02b0f8981fba91f8caf5ca39725db0dc3478791d4cd46261ef9e0b48a7c |
Close
Hashes for spark_dataframe_tools-0.6.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d1c75bc8dd6e82157941484da3d3f38b46acab3ebf04004038de161a9079a36 |
|
MD5 | a4c829786ef4b1bde984ac63ae496630 |
|
BLAKE2b-256 | 19c2693abeffb23ce1a2a4ac7ec93b7a50cb07611dbf502d8f1fa6d262df13bb |