Results 1 to 2 of 2

Thread: to group successive datasets using pandas in python

Threaded View

  1. #1
    Join Date
    Apr 2011
    Beans
    9

    to group successive datasets using pandas in python

    hello. I have a huge GPS datasets of the form (id,timestamp,longitude,latitude). Something like this
    id timestamp longitude latitude
    3 2001-02-02 13:02:01 132.3245 56.2345
    3 2001-02-02 13:02:06 132.3245 56.2345
    3 ......... same as above same as above
    .... .... ....
    3 2001-02-02 13:05:01 132.3245 56.2345
    3 2001-02-02 13:05:06 132.3246 56.2345
    the above is just an example of how my data is present. I have around 990000 records roughly. now i want something like this
    id timestamp longitude latitude
    3 2001-02-02 13:02:01 - 2001-02-02 13:05:01 132.3245 56.2345
    3 2001-02-02 13:05:06 132.3246 56.2345
    i want to merge all the rows of same latitude and longitude values into a single row. I am a beginner in pandas and i cannot use "group by" function where group by groups all the occurances but i want successive occurances to be grouped.

    any help would be surely appreciated.
    thank you very much..
    Last edited by madhu91; March 10th, 2013 at 05:35 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •