Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
755 views
in Technique[技术] by (71.8m points)

csv - is it possible to make a base 60 float

I currently have code that plots data from a CSV using matplotlib. The problem is the math I am trying to run is time dependant, and when I set my x-axis to float(time.strftime("%M%S")), using the datetime module, there's a gap in the plotted graph between 60-100, as the time value is base 60, unlike the base 10 float number system, so is there any way to fix this, by making the float base 60?

apologies for the rush

question from:https://stackoverflow.com/questions/65952315/is-it-possible-to-make-a-base-60-float

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

convert M and S separately, and just M + S/60. You have a lot of simple solution. I wonder why the idea of "base 60 float" (ok, what I did it is just a base 60 calculation, but it is simpler to interpret as minute, seconds, then thinking about base 60) -Giacomo Catenazzi


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...