IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Calcul scientifique Python Discussion :

Regrouper tous les fichiers se trouvant dans des dossiers différents puis faire la somme sur date récente


Sujet :

Calcul scientifique Python

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Homme Profil pro
    Ingénieur Météo
    Inscrit en
    Août 2018
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Côte d'Ivoire

    Informations professionnelles :
    Activité : Ingénieur Météo
    Secteur : Transports

    Informations forums :
    Inscription : Août 2018
    Messages : 9
    Par défaut Regrouper tous les fichiers se trouvant dans des dossiers différents puis faire la somme sur date récente
    Bonjour,


    je souhaite dans un premier temps regrouper tous les fichiers se trouvant dans des sous dossier( voir image) et arriver à créer un fichier appartenant à un seul dossier.

    Les fichiers sont au pas de temps de la minute, je désire tous les regrouper en respectant les dates du 1er janvier au 31 décembre pour obtenir un fichier année x.

    Enfin dans un second temps opérer des calculs sur le fichier obtenu à des pas de temps définis.

    Nom : dossier.JPG
Affichages : 175
Taille : 40,6 Ko Nom : rangé.JPG
Affichages : 174
Taille : 45,3 KoNom : echantillon_minute.JPG
Affichages : 166
Taille : 201,0 Ko

    J'ai écrit le code suivant, cependant il ne peut que faire sous-dossier par sous-dossier(mois par mois):

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    import pandas as pd
    import glob
    import os
    import numpy as np
    import datetime as dt
    from datetime import timedelta
    def concatenate(indir="X:/XX/XXX/XXXX/XXXXX/2013/Octobre", outfile="X:/XX/XXX/XXXX/XXXXX/XXXXXX/annee_2013/Octobre.xlsx", daily="X:/XX/XXX/XXXX/XXXXX/année_2013/df_cum_Octobre.xlsx",sep='\t'):    
        os.chdir(indir)
        filelist=glob.glob("*.his")
        abjlist=[]
        colnames=['DATE','INSTANT_RAIN','H1_RAIN','H3_RAIN','H6_RAIN','H12_RAIN','H24_RAIN','H1_RESET','H3_RESET','H6_RESET','H12_RESET','H24_RESET','MIN10_RESET']
        for filename in filelist:
            print(filename)
            abj=pd.read_csv(filename, header=1, index_col="CREATEDATE", parse_dates=True, keep_date_col=True, converters={'INSTANT_RAIN' : float})
            abjlist.append(abj)
     
        concatdf=pd.concat(abjlist,axis=0)
        #concatdf.drop(['DATE'], axis=1, inplace=True) 
        print(type(concatdf))
        concatdf.columns=colnames
        concatdf.head()
        range = pd.date_range('2013-10-01', '2013-10-31', freq='D')
        df_Jour= pd.DataFrame(index = range)
        df_Jour['INSTANT_RAIN'] = concatdf.INSTANT_RAIN.resample('D').sum()
     
        range = pd.date_range('2013-10-01', '2013-10-31', freq='5T')
        df_5T= pd.DataFrame(index = range)
        df_5T['INSTANT_RAIN'] = concatdf.INSTANT_RAIN.resample('5T').sum()
     
        range = pd.date_range('2013-10-01', '2013-10-31', freq='10T')
        df_10T= pd.DataFrame(index = range)
        df_10T['INSTANT_RAIN'] = concatdf.INSTANT_RAIN.resample('10T').sum()
     
        range = pd.date_range('2013-10-01', '2013-10-31', freq='15T')
        df_15T= pd.DataFrame(index = range)
        df_15T['INSTANT_RAIN'] = concatdf.INSTANT_RAIN.resample('15T').sum()
     
        range = pd.date_range('2013-10-01', '2013-10-31', freq='30T')
        df_30T= pd.DataFrame(index = range)
        df_30T['INSTANT_RAIN'] = concatdf.INSTANT_RAIN.resample('30T').sum()
     
        range = pd.date_range('2013-10-01', '2013-10-31', freq='45T')
        df_45T= pd.DataFrame(index = range)
        df_45T['INSTANT_RAIN'] = float(concatdf.INSTANT_RAIN.resample('45T')).sum()
     
        range = pd.date_range('2013-10-01', '2013-10-31', freq='60T')
        df_60T= pd.DataFrame(index = range)
        df_60T['INSTANT_RAIN'] = concatdf.INSTANT_RAIN.resample('60T').sum()
     
        range = pd.date_range('2013-10-01', '2013-10-31', freq='120T')
        df_120T= pd.DataFrame(index = range)
        df_120T['INSTANT_RAIN'] = concatdf.INSTANT_RAIN.resample('120T').sum()
     
        range = pd.date_range('2013-10-01', '2013-10-31', freq='150T')
        df_150T= pd.DataFrame(index = range)
        df_150T['INSTANT_RAIN'] = concatdf.INSTANT_RAIN.resample('150T').sum()
     
        range = pd.date_range('2013-10-01', '2013-10-31', freq='180T')
        df_180T= pd.DataFrame(index = range)
        df_180T['INSTANT_RAIN'] = concatdf.INSTANT_RAIN.resample('180T').sum()
     
        range = pd.date_range('2013-10-01', '2013-10-31', freq='240T')
        df_240T= pd.DataFrame(index = range)
        df_240T['INSTANT_RAIN'] = concatdf.INSTANT_RAIN.resample('240T').sum()
     
        range = pd.date_range('2013-10-01', '2013-10-31', freq='M')
        df_M= pd.DataFrame(index = range)
        df_M['INSTANT_RAIN'] = concatdf.INSTANT_RAIN.resample('M').sum()
     
        concatdf.to_excel(outfile,index=True)
        df_Jour.to_excel(daily,index=True)
        df_5T.to_excel("df_5T.xlsx",index=True)
        df_10T.to_excel("df_10T.xlsx",index=True)
        df_15T.to_excel("df_15T.xlsx",index=True)
        df_30T.to_excel("df_30T.xlsx",index=True)
        df_45T.to_excel("df_45T.xlsx",index=True)
        df_60T.to_excel("df_60T.xlsx",index=True)
        df_120T.to_excel("df_120T.xlsx",index=True)
        df_150T.to_excel("df_150T.xlsx",index=True)
        df_180T.to_excel("df_180T.xlsx",index=True)
        df_240T.to_excel("df_240T.xlsx",index=True)
        df_M.to_excel("df_M.xlsx",index=True)
     
    concatenate()
    vous trouverez ci-joint 2 fichiers au format "his" correspondant à 2 journées du sous dossier juin(à defaut de ne pouvoir charge les 2 fichiers, je donne un début des données).

    History file
    CREATEDATE, SITE, INSTANT RAIN (MM), 1H RAIN (MM), 3H RAIN (MM), 6H RAIN (MM), 12H RAIN (MM), 24H RAIN (MM), 1H RAIN RESET(MM), 3H RAIN RESET(MM), 6H RAIN RESET(MM), 12H RAIN RESET(MM), 24H RAIN RESET(MM), 10MIN RAIN RESET(MM)
    2013-06-01 00:00:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:01:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:02:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:03:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:04:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:05:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:06:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:07:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:08:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:09:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:10:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:11:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:12:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:13:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:14:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:15:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:16:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:17:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:18:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:19:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:20:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:21:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:22:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:23:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:24:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:25:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:26:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:27:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:28:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:29:00, RWY21, 0.0, 1.0, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:30:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:31:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:32:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:33:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:34:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.5, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:35:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:36:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:37:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:38:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:39:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:40:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:41:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:42:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:43:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:44:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:45:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:46:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:47:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:48:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.5, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:49:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:50:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:51:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:52:00, RWY21, 0.0, 0.5, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:53:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:54:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:55:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:56:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:57:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:58:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 00:59:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:00:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:01:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:02:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:03:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:04:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:05:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:06:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:07:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:08:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:09:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:10:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:11:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:12:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:13:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:14:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:15:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:16:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:17:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:18:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:19:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:20:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:21:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:22:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:23:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:24:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:25:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:26:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:27:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:28:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:29:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:30:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:31:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:32:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:33:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:34:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:35:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:36:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:37:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:38:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:39:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:40:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:41:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:42:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:43:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:44:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:45:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:46:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:47:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:48:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:49:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:50:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:51:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:52:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:53:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:54:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:55:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:56:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:57:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:58:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 01:59:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:00:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:01:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:02:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:03:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:04:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:05:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:06:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:07:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:08:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:09:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:10:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:11:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:12:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:13:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:14:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:15:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:16:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:17:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:18:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:19:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:20:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:21:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:22:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:23:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:24:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:25:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:26:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:27:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:28:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:29:00, RWY21, 0.0, 0.0, 1.0, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:30:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:31:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:32:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:33:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:34:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:35:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:36:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:37:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:38:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:39:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:40:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:41:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:42:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:43:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:44:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:45:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:46:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:47:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:48:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.5, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:49:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:50:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:51:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:52:00, RWY21, 0.0, 0.0, 0.5, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:53:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:54:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:55:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:56:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:57:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:58:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 02:59:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 03:00:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 03:01:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 03:02:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 03:03:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 03:04:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 03:05:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 03:06:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 03:07:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 03:08:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 03:09:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 03:10:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 03:11:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0
    2013-06-01 03:12:00, RWY21, 0.0, 0.0, 0.0, 1.0, 1.0, 9.0, 0.0, 0.0, 0.5, 1.0, 8.5, 0.0

    Merci d'avance.

  2. #2
    Membre éprouvé
    Homme Profil pro
    Vagabong étudiant en annalyse du signal.
    Inscrit en
    Avril 2019
    Messages
    131
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 26
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Vagabong étudiant en annalyse du signal.
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Avril 2019
    Messages : 131
    Par défaut une petite reformulation?
    Bonjour,

    Je ne comprends pas vraiment ce que vous voulez faire, et je ne comprend pas non plus le problème que vous avez?

    créer un fichier appartenant à un seul dossier.

    C'est à dire? Vous voulez regrouper les fichiers pour les faire tous apparaître dans un seul dossier sans aucun sous-répertoires?
    Vous voulez faire un seul fichier dont le contenu est la concaténation des autres fichiers? Je sui déjà perdu à cette étape là!

    sous-dossier par sous-dossier(mois par mois)
    C'est pas ce que vous voulez???
    Peut être ma réponse est totalement à coté de la plaque mais il y a une option 'recursive=False' dans glob.glob.

    Peut être pouvez vous faire : glob.glob("*.his", recursive=True).

    Mais je ne comprend pas suffisamment ce que vous voulez pour pouvoir vous aidez d'avantage.

  3. #3
    Membre averti
    Homme Profil pro
    Ingénieur Météo
    Inscrit en
    Août 2018
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Côte d'Ivoire

    Informations professionnelles :
    Activité : Ingénieur Météo
    Secteur : Transports

    Informations forums :
    Inscription : Août 2018
    Messages : 9
    Par défaut
    Bonjour robinechuca,

    Je suis ravi que vous m'ayez répondu,

    ma préoccupation est que j'ai une liste de sous-dossiers nommés de "janvier à décembre" souvent dans le désordre disposé dans un dossier que j'ai nommé "année 2013",

    Les sous-dossiers contiennent les fichiers de données enregistrés par minute au format ".his"

    je veux pouvoir regrouper tous ces fichiers du 1er janvier au 31 décembre en tenant pas compte de la position du fichier même si se trouvant dans un autre sous dossier.

    J'ai été un peu clair, j'espère.

    Je vous en remercie énormément vue le temps que j'avais mis.

Discussions similaires

  1. Réponses: 1
    Dernier message: 19/10/2019, 16h44
  2. Réponses: 2
    Dernier message: 14/05/2017, 08h40
  3. Réponses: 5
    Dernier message: 20/04/2017, 19h34
  4. Réponses: 4
    Dernier message: 23/03/2009, 22h07
  5. Réponses: 0
    Dernier message: 02/11/2007, 15h02

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo