title: Dealing with data attributes in weka jython
body: <p>I am using <a href="/questions/tagged/jython" class="post-tag" title="show questions tagged &#39;jython&#39;" rel="tag">jython</a> on <a href="/questions/tagged/weka" class="post-tag" title="show questions tagged &#39;weka&#39;" rel="tag">weka</a>, and my goal is to visualize my data with a time horizon; so for that I need to get the date attribute and play a little with it. I will like to know if it is possible to do that in <a href="/questions/tagged/jython" class="post-tag" title="show questions tagged &#39;jython&#39;" rel="tag">jython</a> interface; I tried for example to print the particular attribute but it keeps yelling at me. For example:</p>
  <pre><code># load data file
  file = FileReader(&quot;C:/file_path/file_name.arff&quot;)
  data = Instances(file)
  data.setClassIndex(data.numAttributes() - 1)
  
  print(data)
  </code></pre>
  <p>output:</p>
  <pre><code>@relation file_name
  
  @attribute dates date dd/mm/yyyy
  
  *...etc*
  </code></pre>
  <p>Another example:</p>
  <pre><code># load data file
  file = FileReader(&quot;C:/file_path/file_name.arff&quot;)
  data = Instances(file)
  data.setClassIndex(data.numAttributes() - 1)
  
  print(data.dates)
  </code></pre>
  <p>output:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;C:\file_path\untitled&quot;, line 26, in &lt;module&gt;
  AttributeError: 'weka.core.Instances' object has no attribute 'dates'
  </code></pre>