title: Pandas select unique values from column
body: <p>I was able to ingest a csv in jupyter notes by doing this :</p>
  
  <pre><code>csvData= pd.read_csv("logfile.csv")
  </code></pre>
  
  <p>My data looks like this:</p>
  
  <pre><code>event_timestamp ip  url 
  2018-01-10 00:00 111.111.111.111 http://webpage1.com
  2018-01-10 00:00 222.222.222.222 http://webpage2.com
  ...
  ..
  .
  </code></pre>
  
  <p>I got a list of unique ips:</p>
  
  <pre><code>list_ips = csvData("[ip]")
  </code></pre>
  
  <p>What I'm trying to do is get a <strong>unique</strong>. Normally I would do:</p>
  
  <pre><code>list_ips.unique()
  </code></pre>
  
  <p>But in this case I get this error:</p>
  
  <pre><code>AttributeError: 'DataFrame' object has no attribute 'unique'
  </code></pre>
  
  <p>(I can use list_ips.head() and it will list a few IPs but it's not a unique list)</p>
  
  <p>Thanks</p>
  
  <p><strong><em>EDIT</em></strong>
  My problem is I actually had: </p>
  
  <pre><code>list_ips = csvData([["ip"]]) 
  </code></pre>
  
  <p>So I removed 1 set of brackets so it became:</p>
  
  <pre><code>list_ips = csvData(["ip"]) 
  </code></pre>
  
  <p>Then I was able to follow Wen's example and do:</p>
  
  <pre><code>list_ips.unique().tolist()
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>['111.111.111.111','222.222.222.222'...]
  </code></pre>