How to plot timestamps within a row?

  • #1
msn009
53
6
i have a dataset that has the timestamp data within each row and I am trying to plot the values to see the distribution but have no idea how to do it if the data is presented this way as attached. any ideas? thanks
 

Attachments

  • pic5.png
    pic5.png
    7.5 KB · Views: 300

Answers and Replies

  • #2
phinds
Science Advisor
Insights Author
Gold Member
2021 Award
17,805
9,864
are you not able to strip off the seconds and milliseconds? Seems like this should be trivially easy. What language are you using?
 
  • #3
36,213
8,194
What language are you using?
Several other threads by the OP show Python code.
 
  • #4
anorlunda
Staff Emeritus
Insights Author
10,714
8,007
Read it into a spreadsheet. Most spreadsheets include many ways to read or display time. The spreadsheet can also make the plots for you.
 
  • #5
phinds
Science Advisor
Insights Author
Gold Member
2021 Award
17,805
9,864
what he said (very small).jpg
 

Attachments

  • what he said (very small).jpg
    what he said (very small).jpg
    3.9 KB · Views: 167
  • #6
msn009
53
6
sorry, i thought the tag would show python and yes it is in python. but these timestamps are within the row itself and i have several hundred rows with this data inside each. i thought of doing it in python so that i can read the file and plot a chart for each.
 
  • #7
phinds
Science Advisor
Insights Author
Gold Member
2021 Award
17,805
9,864
sorry, i thought the tag would show python and yes it is in python. but these timestamps are within the row itself and i have several hundred rows with this data inside each. i thought of doing it in python so that i can read the file and plot a chart for each.
Then I ask again, can you not just strip off the seconds and milliseconds? I don't know Python but in C and VB.NET this is easy and doing your own plot would be reasonably easy.
 
  • #8
13,716
7,708
awk would be the easiest thing to use if you're on linux.
Code:
awk '{print $2}' input filename_goes_here >outputfilename_goes_here
Awk processes each line and prints out only the second column and from there you can plot the data
 

Suggested for: How to plot timestamps within a row?

  • Last Post
Replies
1
Views
943
  • Last Post
Replies
21
Views
2K
  • Last Post
Replies
6
Views
1K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
6
Views
668
Replies
5
Views
1K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
3
Views
517
  • Last Post
Replies
2
Views
2K
Top