Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

137
Views
Transform Data from Django ORM to custom CSV format

Given the following models:

class Stream(models.Model):
    name = models.CharField(max_length=32)
    label = models.CharField(max_length=32)
    ...

class Data(models.Model):
    class Meta:
        ordering = ['timestamp']
    timestamp = models.DateTimeField(db_index=True)  # in UTC !
    data = models.FloatField()
    stream = models.ForeignKey(to=Stream, editable=False)
    ...

I need to output results in the following (CSV) format:

Example output:

Timestamp,A,B,C,D
2017/03/03:00:01:00,4,2,1.9,3
2017/03/03:00:01:15,4,3,1.8.3
...

A,B,C and D are streams labels.

Values are from Data.data field.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!