ValueError: Some of types cannot be determined by the first 100 rows, please try again with sampling
2018-02-24 14:59
555 查看
ValueError: Some of types cannot be determined by the first 100 rows, please try again with sampling
Resolutions:1.Improve sample ratio, e.g.
sqlContext.createDataFrame(rdd, samplingRatio=0.2)
2.Tell spark the explicit schema, e.g.
from pyspark.sql.types import *schema = StructType([ StructField("column_1", StringType(), True), StructField("column_2", IntegerType(), True)])df = sqlContext.createDataFrame(rdd, schema=schema)
Resolutions:1.Improve sample ratio, e.g.
sqlContext.createDataFrame(rdd, samplingRatio=0.2)
2.Tell spark the explicit schema, e.g.
from pyspark.sql.types import *schema = StructType([ StructField("column_1", StringType(), True), StructField("column_2", IntegerType(), True)])df = sqlContext.createDataFrame(rdd, schema=schema)
相关文章推荐
- 解决ValueError: Some of types cannot be determined by the first 100 rows, please try again with sampli
- 解决ValueError: Some of types cannot be determined by the first 100 rows, please try again with sampli
- Some of your uncommitted changes would be overwritten by syncing.Please commit your changes then try
- **** cannot be found. please check the location and try again 问题解决
- Some of your uncommitted changes would be overwritten by syncing.Please commit your changes then try
- 第一次看《随遇而安》First impression of <Be Peaceful With The Life>
- Cannot yield a value in the body of a try block with a catch clause
- can not be found.please check the location and try again
- 解决The file XXX can not be found.Please check the location and try again!
- MyEclipse中消除frame引起的“the file XXX can not be found.Please check the location and try again.”的错误
- bpel 测试遇到“The content of the body cannot be displayed in the form view. Please switch to the source”
- MyEclipse中消除frame引起的“the file XXX can not be found.Please check the location and try again.”的错误
- [转] EF cannot be tracked because another instance of this type with the same key is already being tracked
- cannot be opened with the QT 4 from editor.try converting the file using uic.exe
- You cannot run the non-logged version of bulk copy in this database. Please check with the DBO. 问题的解决方法
- MyEclipse中消除frame引起的“the file XXX can not be found.Please check the location and try again.”的错误
- xml无法显示(Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again la
- type parameters of <T>T cannot be determined; no unique maximal instance exists for type variable T with upper bounds int,java.lang.Object
- 解决方案: the selected file is a solution file but was created by a newer version of this application and cannot be opened
- PowerShell: 如何解决File **.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get- help about_sig" for more de