title: Spark toDebugString not nice in python
body: <p>This is what I get when I use <strong>toDebugString</strong> in <strong>scala</strong>:</p>
  
  <pre><code>scala&gt; val a  = sc.parallelize(Array(1,2,3)).distinct
  a: org.apache.spark.rdd.RDD[Int] = MappedRDD[3] at distinct at &lt;console&gt;:12
  
  scala&gt; a.toDebugString
  res0: String = 
  (4) MappedRDD[3] at distinct at &lt;console&gt;:12
   |  ShuffledRDD[2] at distinct at &lt;console&gt;:12
   +-(4) MappedRDD[1] at distinct at &lt;console&gt;:12
      |  ParallelCollectionRDD[0] at parallelize at &lt;console&gt;:12
  </code></pre>
  
  <p>This is the equivalent in <strong>python</strong>:</p>
  
  <pre><code>&gt;&gt;&gt; a = sc.parallelize([1,2,3]).distinct()
  &gt;&gt;&gt; a.toDebugString()
  '(4) PythonRDD[6] at RDD at PythonRDD.scala:43\n |  MappedRDD[5] at values at NativeMethodAccessorImpl.java:-2\n |  ShuffledRDD[4] at partitionBy at NativeMethodAccessorImpl.java:-2\n +-(4) PairwiseRDD[3] at RDD at PythonRDD.scala:261\n    |  PythonRDD[2] at RDD at PythonRDD.scala:43\n    |  ParallelCollectionRDD[0] at parallelize at PythonRDD.scala:315'
  </code></pre>
  
  <p>As you can see, the output is not as nice in python as in scala. Is there any trick to have a nicer output of this function? </p>
  
  <p>I am using Spark 1.1.0. </p>