Results 1 to 2 of 2

Thread: to group successive datasets using pandas in python

Hybrid 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.

  2. #2
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: to group successive datasets using pandas in python

    Thread moved to Programming Talk, at request of OP.

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

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
  •