title: Pyspark : convert string to foat for all the dataframe
body: <p>I have a data frame that contains several columns (1000) and they have string type. I want to transform them to float not one column by one column but all the data frame at one time.</p>
  <p>Furthermore, I know this exists:</p>
  <pre><code> from pyspark.sql.types import IntegerType
   data_df = data_df.withColumn(&quot;column_name&quot;, data_df[&quot;columns_name&quot;].cast(IntegerType()))
  </code></pre>
  <p>But I'm researching for something like this : </p>
  <pre><code>data_df = data_df.cast(IntegerType()))
  </code></pre>