Delete lines from the csv file

hello, i'm having a csv file where to save data in and then ploting it on chart
i'm having this functionality to record data received from sensors to the csv file and showing these data on charts but the thing is that i want to delete that data (not the hole file) after a while to record other data and so on and now i'm stuck, any help please!!

You'd be far better off storing the data in a database. It is so much easier to read (for chart) and delete old data & manipulate than CSV files.

Are you familiar with databases?

Typically this type of data is suited to a time series database but they can be a bit harder to grasp than something like sqlite or mySQL.

thnak you for the alternative, actually i'm willing to work on futur projects with data base but i can not go back in this one right now.
Is there any solution with csv file ?
thank you.

If you are creating the CSV file (and it is on the NR server), why not delete the file and recreate it when you need to?

cause i'm having a static info that can not be added with the new creation with the csv file which is the first line having the name of data
so i'm trying every time i want to record new data delete the old one and save the new one
image

Why can’t you add the first line? Did you look at the csv node’s options?
The one that save the first row will be the titles?

We also need to understand how large that CSV file gets and how often it changes because that will help point to a solution (as usual there are many answers to this question).

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.