How do I order fields of my Row objects in Spark (Python) : <p>I'm creating Row objects in Spark. I do not want my fields to be ordered alphabetically. However, if I do the following they are ordered alphabetically.</p>

<pre><code>row = Row(foo=1, bar=2)
</code></pre>

<p>Then it creates an object like the following:</p>

<pre><code>Row(bar=2, foo=1)
</code></pre>

<p>When I then create a dataframe on this object, the column order is going to be bar first, foo second, when I'd prefer to have it the other way around.</p>

<p>I know I can use "_1" and "_2" (for "foo" and "bar", respectively) and then assign a schema (with appropriate "foo" and "bar" names). But is there any way to prevent the Row object from ordering them?</p>
