반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Excel
- hive
- Google Excel
- Apache
- django
- list
- Github
- SQL
- numpy
- Tkinter
- math
- Redshift
- c#
- dataframe
- Python
- PostgreSQL
- Kotlin
- Mac
- google apps script
- PANDAS
- Java
- gas
- GIT
- PySpark
- array
- string
- Google Spreadsheet
- 파이썬
- matplotlib
Archives
- Today
- Total
목록spark filter (1)
달나라 노트
Python pyspark : filter (spark dataframe filtering)
spark dataframe에서도 특정 조건을 만족하는 행만을 추출할 수 있습니다. from pyspark.sql import SparkSession from pyspark.sql.functions import col import pandas as pd spark = SparkSession.builder.getOrCreate() df_test = pd.DataFrame({ 'a': [1, 2, 3], 'b': [10.0, 3.5, 7.315], 'c': ['apple', 'banana', 'tomato'] }) df_spark = spark.createDataFrame(df_test) df_spark_filtered = df_spark.filter( # 1 df_spark.a == 2 ) df_spark..
Python/Python pyspark
2021. 5. 19. 05:36