title: How to resample data in Pandas with discrete data?
body: <p>I am stuck with pandas. My idea is to resample data that are expressed by factors. For example, I have observed two cats named Charles and Valentine. As animals are expressing the behavior for longer times, the observations are made when current behaviour changes. I want to resample to get minute-wise data</p>
  
  <pre><code>name;timestamp;activity
  Charles;10.10.18 12:31;drinks
  Charles;10.10.18 12:51;sleep
  Charles;10.10.18 13:01;mouse
  Valentine;10.10.18 12:31;drinks
  Valentine;10.10.18 12:51;sleep
  Valentine;10.10.18 13:01;purr
  </code></pre>
  
  <p>My desired output should look like this:</p>
  
  <pre><code>name    timestamp   activity
  Charles 10.10.18 12:31  drinks
  Charles 10.10.18 12:32  drinks
  Charles 10.10.18 12:33  drinks
  Charles 10.10.18 12:34  drinks
  Charles 10.10.18 12:35  drinks
  Charles 10.10.18 12:36  drinks
  Charles 10.10.18 12:37  drinks
  Charles 10.10.18 12:38  drinks
  Charles 10.10.18 12:39  drinks
  Charles 10.10.18 12:40  drinks
  Charles 10.10.18 12:41  drinks
  Charles 10.10.18 12:42  drinks
  Charles 10.10.18 12:43  drinks
  Charles 10.10.18 12:44  drinks
  Charles 10.10.18 12:45  drinks
  Charles 10.10.18 12:46  drinks
  Charles 10.10.18 12:47  drinks
  Charles 10.10.18 12:48  drinks
  Charles 10.10.18 12:49  drinks
  Charles 10.10.18 12:50  drinks
  Charles 10.10.18 12:51  sleeps
  Charles 10.10.18 12:52  sleeps
  Charles 10.10.18 12:53  sleeps
  Charles 10.10.18 12:54  sleeps
  Charles 10.10.18 12:55  sleeps
  Charles 10.10.18 12:56  sleeps
  Charles 10.10.18 12:57  sleeps
  Charles 10.10.18 12:58  sleeps
  Charles 10.10.18 12:59  sleeps
  Charles 10.10.18 13:00  sleeps
  Charles 10.10.18 13:01  mouse
  Valentine   10.10.18 12:31  drinks
  Valentine   10.10.18 12:32  drinks
  Valentine   10.10.18 12:33  drinks
  Valentine   10.10.18 12:34  drinks
  Valentine   10.10.18 12:35  drinks
  Valentine   10.10.18 12:36  drinks
  Valentine   10.10.18 12:37  drinks
  Valentine   10.10.18 12:38  drinks
  Valentine   10.10.18 12:39  drinks
  Valentine   10.10.18 12:40  drinks
  Valentine   10.10.18 12:41  drinks
  Valentine   10.10.18 12:42  drinks
  Valentine   10.10.18 12:43  drinks
  Valentine   10.10.18 12:44  drinks
  Valentine   10.10.18 12:45  drinks
  Valentine   10.10.18 12:46  drinks
  Valentine   10.10.18 12:47  drinks
  Valentine   10.10.18 12:48  drinks
  Valentine   10.10.18 12:49  drinks
  Valentine   10.10.18 12:50  drinks
  Valentine   10.10.18 12:51  sleeps
  Valentine   10.10.18 12:52  sleeps
  Valentine   10.10.18 12:53  sleeps
  Valentine   10.10.18 12:54  sleeps
  Valentine   10.10.18 12:55  sleeps
  Valentine   10.10.18 12:56  sleeps
  Valentine   10.10.18 12:57  sleeps
  Valentine   10.10.18 12:58  sleeps
  Valentine   10.10.18 12:59  sleeps
  Valentine   10.10.18 13:00  sleeps
  Valentine   10.10.18 13:01  purr
  </code></pre>
  
  <p>Using </p>
  
  <pre><code>data.resample('60S').pad() 
  </code></pre>
  
  <p>didn't work as Pandas states that timestamps are not unique.</p>
  
  <p>Subsetting data for one cat per time didn't help much.</p>