반응형
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
- hive
- Java
- GIT
- Google Excel
- PySpark
- Apache
- Kotlin
- Excel
- list
- Github
- c#
- array
- gas
- Redshift
- django
- PostgreSQL
- matplotlib
- string
- PANDAS
- Google Spreadsheet
- 파이썬
- google apps script
- math
- dataframe
- SQL
- Tkinter
- Python
- numpy
- Mac
Archives
- Today
- Total
목록column alias (1)
달나라 노트
Python pyspark : alias (컬럼 이름 변경하기)
alias method를 이용해서 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 = df_spark.select( col('a'), col('b'), col('c..
Python/Python pyspark
2021. 5. 28. 19:10