Quantcast
Channel: Correctly reading the types from file in PySpark - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by zero323 for Correctly reading the types from file in PySpark

It is properly read, it just doesn't work as you expect. Schema argument declares what are the types to avoid expensive schema inference not how to cast the data. Providing input that matches declared...

View Article



Correctly reading the types from file in PySpark

I have a tab-separated file containing lines asid1 name1 ['a', 'b'] 3.0 2.0 0.0 1.0that is, an id, a name, a list with some strings, and a series of 4 float attributes.I am reading this file as rdd =...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>