def handle(self, path, *args, **options): """Assumes a csv file with headers, comma delimiters, and quoted values. Values accessed by keys SiteCode, Species, Year, and SumOfCountA This command _will_ overwrite existing observations. """ kfm = Project.objects.get(name="NPS Kelp Forest Monitoring") saved = import_data(path, kfm, 'Fish Transect', u"# per transect", u"per transect", site='SiteCode', taxon='Species', year='Year', mean='SumOfCountA') print "Save %d records." % (saved, )
def handle(self, path, *args, **options): """Assumes a csv file with headers, comma delimiters, and quoted values. Values accessed by keys SiteCode, Species, Year, Mean, and "Std Error" This command _will_ overwrite existing observations. """ kfm = Project.objects.get(name="NPS Kelp Forest Monitoring") saved = import_data(path, kfm, 'Quadrat: 1 Meter', u"# per m\u00B2", u"per m\u00B2", site='SiteCode', taxon='Species', year='Year', mean='Mean', stderror='Std Error') print "Save %d records." % (saved, )