Help with dates

Discussion in 'Python' started by Angelo Secchi, Apr 14, 2004.

  1. Hi,
    I have a dictionary, data, with the following structure:

    >>>data['III']


    [['18-07-1994', '283.000000', '292.500000', '27712168.000000']
    ['19-07-1994', '292.000000', '294.500000', '2492106.000000']
    ['20-07-1994', '294.000000', '294.500000', '4881451.000000']
    ['21-07-1994', '292.000000', '291.000000', '2183402.000000']
    ['22-07-1994', '293.000000', '291.000000', '889050.000000']
    ['25-07-1994', '293.000000', '292.000000', '657931.000000']]

    and I would like to create a "sort" of daily increments of, for example,
    the second column (ex. 292-283). I say "sort" since I do not need to
    consider week ends (i.e. I can consider them as one day) but I would
    also like to check if, in my database, there are big time jumps and
    possibly discard corresponding increments. Where should I look for
    hints in how to solve this task?

    Thanks a lot,

    angelo



    --
    ========================================================
    Angelo Secchi PGP Key ID:EA280337
    ========================================================
    Current Position:
    Graduate Fellow Scuola Superiore S.Anna
    Piazza Martiri della Liberta' 33, Pisa, 56127 Italy
    ph.: +39 050 883365
    email: www.sssup.it/~secchi/
    ========================================================
     
    Angelo Secchi, Apr 14, 2004
    #1
    1. Advertising

  2. Angelo Secchi

    wes weston Guest

    Angelo Secchi wrote:
    >
    > Hi,
    > I have a dictionary, data, with the following structure:
    >
    >
    >>>>data['III']

    >
    >
    > [['18-07-1994', '283.000000', '292.500000', '27712168.000000']
    > ['19-07-1994', '292.000000', '294.500000', '2492106.000000']
    > ['20-07-1994', '294.000000', '294.500000', '4881451.000000']
    > ['21-07-1994', '292.000000', '291.000000', '2183402.000000']
    > ['22-07-1994', '293.000000', '291.000000', '889050.000000']
    > ['25-07-1994', '293.000000', '292.000000', '657931.000000']]
    >
    > and I would like to create a "sort" of daily increments of, for example,
    > the second column (ex. 292-283). I say "sort" since I do not need to
    > consider week ends (i.e. I can consider them as one day) but I would
    > also like to check if, in my database, there are big time jumps and
    > possibly discard corresponding increments. Where should I look for
    > hints in how to solve this task?
    >
    > Thanks a lot,
    >
    > angelo
    >
    >
    >
    > --
    > ========================================================
    > Angelo Secchi PGP Key ID:EA280337
    > ========================================================
    > Current Position:
    > Graduate Fellow Scuola Superiore S.Anna
    > Piazza Martiri della Liberta' 33, Pisa, 56127 Italy
    > ph.: +39 050 883365
    > email: www.sssup.it/~secchi/
    > ========================================================
    >


    angelo,
    Do you want to sort within one key's list/value? Would it be
    better to have a key like ('III','18-07-1994') with
    a value ('283.000000', '292.500000', '27712168.000000')? 'not sure
    I understand what you're doing.
    wes
     
    wes weston, Apr 14, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Lozzi

    Dates dates dates dates... SQL and ASP.NET

    David Lozzi, Sep 29, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    869
    Rob Schieber
    Sep 30, 2005
  2. PW

    Dates! Dates! Dates!

    PW, Aug 7, 2004, in forum: ASP General
    Replies:
    4
    Views:
    198
    Mark Schupp
    Aug 9, 2004
  3. Replies:
    1
    Views:
    206
    Jano Svitok
    Jul 17, 2007
  4. kellygreer1

    RFC-822 dates into Ruby dates

    kellygreer1, Jun 8, 2008, in forum: Ruby
    Replies:
    1
    Views:
    200
    Eric I.
    Jun 8, 2008
  5. Dr J R Stockton

    FAQ Dates; Opera Dates.

    Dr J R Stockton, Jun 18, 2007, in forum: Javascript
    Replies:
    0
    Views:
    162
    Dr J R Stockton
    Jun 18, 2007
Loading...

Share This Page