pyspark Hive Context — read table with UTF-8 encoding
问题 I have a table in hive, And I am reading that table in pyspark df_sprk_df from pyspark import SparkContext from pysaprk.sql import HiveContext sc = SparkContext() hive_context = HiveContext(sc) df_sprk_df = hive_context.sql('select * from databasename.tablename') df_pandas_df = df_sprk_df.toPandas() df_pandas_df = df_pandas_df.astype('str') but when I try to convert df_pandas_df to astype of str. but I get error like UnicodeEnCodeError :'ascii' codec cant encode character u'\u20ac' in