How to transform dataframes to rdds in structured streaming?

I get data from kafka using pyspark streaming, and the result is a dataframe, when I transform dataframe to rdd, it went wrong: Traceback (most recent call last): File “/home/docs/dp_model/dp_algo_platform/dp_algo_core/test/test.py”, line 36, in <module> df = df.rdd.map(lambda x: x.value.split(” “)).toDF() File “/home/softs/spark-2.4.3-bin-hadoop2.6/python/lib/pyspark.zip/pyspark/sql/dataframe.py”, line 91, in rdd File “/home/softs/spark-2.4.3-bin-hadoop2.6/python/lib/py4j-0.10.7-src.zip/py4j/java_gateway.py”, line 1257, in __call__ File “/home/softs/spark-2.4.3-bin-hadoop2.6/python/lib/pyspark.zip/pyspark/sql/utils.py”, line…

Details