1

I have 22 CALIPSO data files in my folder. I have accessed the parameters required for 1 files and stacked it. Now I want to do it for all other 22 files and store it in a single variable called outData. I created and empty array outData[]. I want to append all the required data from these files to it.

I have tried append, np.append but it didn't work. I also used:

outData = [np.genfrom(file_path, delimiter=',', skip_header=3, skip_footer=18)for file_path in FILE_NAME]
Rich
  • 3,928
  • 4
  • 37
  • 66
Sreerag Ek
  • 13
  • 3

1 Answers1

1

You can use JSON Object I believe.

collection = []

collection.append({
  'filePath': 'value of filepath',
  'delimiter': '-',
  'skipHeader': 'true',
  'skipFooter': 'false'
})

print(collection)
Rich
  • 3,928
  • 4
  • 37
  • 66
  • I have stored the value I collected from a file in the name all variable. So for 22 files all data will be in that variable. I want to append those values separately into outData – Sreerag Ek May 13 '19 at 02:05
  • You mean you'll going to store in on a single variable, but can be pull/access from that variable separately? – Rich May 13 '19 at 02:08
  • alldata = np.hstack((temp,totAOD)) this is the variable where all the values from a file is stored. Now this is for a single file, but I have 22 such files from which values will be collected. Alldata is a matrix with n rows and 15 columns. the number of rows may change for each file, but the number of columns remains the same.So i need to append all the different matrices that will come as I am using a loop, into outData. – Sreerag Ek May 13 '19 at 02:10