반응형
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 |
Tags
- PostgreSQL
- list
- math
- Google Excel
- Tkinter
- Google Spreadsheet
- GIT
- Python
- Github
- gas
- Apache
- Excel
- array
- 파이썬
- PANDAS
- Java
- google apps script
- django
- c#
- matplotlib
- Mac
- string
- SQL
- Kotlin
- hive
- numpy
- dataframe
- PySpark
- Redshift
Archives
- Today
- Total
목록spark dataframe column (1)
달나라 노트
Python pyspark : columns (spark dataframe의 column 리스트 반환)
spark dataframe의 columns 속성을 이용하면 spark dataframe에 있는 column들의 list를 얻을 수 있습니다. (pandas dataframe의 columns랑 비슷합니다.) from pyspark.sql import SparkSession 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) list_columns = df_spark.columns prin..
Python/Python pyspark
2021. 5. 19. 05:46