在Python中将数据框从几天和几小时转换为几秒钟

时间:2020-07-14 11:13:52

标签: python

请给我一个tdelta(dtype:timedelta64 [ns])熊猫数据帧,但是输出以分钟为单位,当我做总和时,它需要几天,但是我需要总计是几秒钟

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>

<button class="sort_clients" data-column="name" data-direction="asc">Name</button>
<button class="sort_clients" data-column="age" data-direction="asc">Age</button>
<button class="sort_clients" data-column="room" data-direction="asc">Room</button>

<div class="list">
  <div class="client" data-name="john" data-age="50" data-room="1 Alpha">John, 50, 1 Alpha</div>
  <div class="client" data-name="susan" data-age="80" data-room="2 Beta">Susan, 84, 2 Beta</div>
  <div class="client" data-name="brad" data-age="70" data-room="3 Delta">Brad, 70, 3 Delta</div>
  <div class="client" data-name="margaret" data-age="45" data-room="Romeo 1">Margaret, 45, Romeo 1</div>
  <div class="client" data-name="steph" data-age="75" data-room="Romeo 3">Steph, 75, Romeo 3</div>
  <div class="client" data-name="matt" data-age="65" data-room="Romeo2">Matt, 65, Romeo2</div>
</div>

输出:(我需要几秒钟) 0 00:05:00 1 00:26:00 2 00:07:00 3 00:06:00 4 00:09:00 dtype:timedelta64 [ns]

0 个答案:

没有答案