- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当从如下列表的列表创建数据框时,所有值都获取类型object
- 尽管大多数都是存储为字符串的int/floats。有没有办法强制执行数值的正确类型(int/float)?
colVals = [['05:17:55.703', '', '', '', '', '', '21', '', '3', '89', '891', '11', ''], ['05:17:55.703', '', '', '', '', '', '21', '', '3', '217', '891', '12', ''], ['05:17:55.703', '', '', '', '', '', '21', '', '3', '217', '891', '13', ''], ['05:17:55.703', '', '', '', '', '', '21', '', '3', '217', '891', '15', ''], ['05:17:55.703', '', '', '', '', '', '21', '', '3', '217', '891', '16', ''], ['05:17:55.703', '', '', '', '', '', '21', '', '3', '217', '891', '17', ''], ['05:17:55.703', '', '', '', '', '', '21', '', '3', '217', '891', '18', ''], ['05:17:55.707', '', '', '', '', '', '18', '', '3', '185', '892', '0', ''], ['05:17:55.707', '', '', '', '', '', '21', '', '3', '185', '892', '1', ''], ['05:17:55.707', '', '', '', '', '', '17', '', '3', '73', '892', '5', ''], ['05:17:55.707', '', '', '', '', '', '17', '', '3', '185', '892', '6', ''], ['05:17:55.707', '', '', '', '', '', '21', '', '3', '73', '892', '7', ''], ['05:17:55.708', '268', '4', '28', '-67.60', '13', '', '2', '', '', '', '', '2'], ['05:17:55.711', '', '', '', '', '', '18', '', '3', '57', '892', '10', ''], ['05:17:55.711', '', '', '', '', '', '21', '', '3', '201', '892', '11', ''], ['05:17:55.711', '', '', '', '', '', '21', '', '3', '25', '892', '12', ''], ['05:17:55.723', '', '', '', '', '', '21', '', '3', '217', '893', '11', ''], ['05:17:55.723', '', '', '', '', '', '21', '', '3', '217', '893', '15', ''], ['05:17:55.723', '', '', '', '', '', '21', '', '3', '217', '893', '16', ''], ['05:17:55.726', '268', '4', '', '-67.80', '', '', '', '', '', '', '', ''], ['05:17:55.728', '', '', '28', '', '12', '31', '2', '3', '185', '894', '0', '1'], ['05:17:55.728', '', '', '', '', '', '31', '', '3', '185', '894', '1', ''], ['05:17:55.731', '', '', '', '', '', '31', '', '3', '217', '894', '10', ''], ['05:17:55.731', '', '', '', '', '', '20', '', '3', '217', '894', '11', ''], ['05:17:55.731', '', '', '', '', '', '20', '', '3', '217', '894', '12', ''], ['05:17:55.731', '', '', '', '', '', '20', '', '3', '217', '894', '13', ''], ['05:17:55.743', '', '', '', '', '', '20', '', '3', '217', '895', '11', ''], ['05:17:55.743', '', '', '', '', '', '20', '', '3', '217', '895', '15', ''], ['05:17:55.743', '', '', '', '', '', '20', '', '3', '217', '895', '16', ''], ['05:17:55.746', '268', '4', '', '-67.82', '', '', '', '', '', '', '', ''], ['05:17:55.747', '', '', '28', '', '13', '20', '2', '3', '185', '896', '1', '2'], ['05:17:55.747', '', '', '', '', '', '20', '', '3', '185', '896', '2', ''], ['05:17:55.747', '', '', '', '', '', '30', '', '3', '217', '896', '5', ''], ['05:17:55.751', '', '', '', '', '', '18', '', '3', '217', '896', '10', ''], ['05:17:55.751', '', '', '', '', '', '21', '', '3', '217', '896', '11', ''], ['05:17:55.751', '', '', '', '', '', '21', '', '3', '217', '896', '12', ''], ['05:17:55.751', '', '', '', '', '', '21', '', '3', '217', '896', '13', ''], ['05:17:55.763', '', '', '', '', '', '31', '', '3', '217', '897', '11', ''], ['05:17:55.763', '', '', '', '', '', '30', '', '3', '217', '897', '15', ''], ['05:17:55.763', '', '', '', '', '', '20', '', '3', '217', '897', '16', ''], ['05:17:55.763', '', '', '', '', '', '20', '', '3', '217', '897', '17', ''], ['05:17:55.766', '268', '4', '', '-67.13', '', '', '', '', '', '', '', ''], ['05:17:55.768', '', '', '28', '', '12', '20', '2', '3', '185', '898', '3', '2'], ['05:17:55.768', '', '', '', '', '', '16', '', '3', '217', '898', '6', ''], ['05:17:55.771', '', '', '', '', '', '18', '', '3', '217', '898', '10', ''], ['05:17:55.771', '', '', '', '', '', '20', '', '3', '217', '898', '11', ''], ['05:17:55.771', '', '', '', '', '', '20', '', '3', '217', '898', '12', ''], ['05:17:55.784', '', '', '', '', '', '20', '', '3', '217', '899', '11', ''], ['05:17:55.784', '', '', '', '', '', '20', '', '3', '41', '899', '12', ''], ['05:17:55.784', '', '', '', '', '', '20', '', '3', '25', '899', '13', ''], ['05:17:55.784', '', '', '', '', '', '20', '', '3', '217', '899', '15', ''], ['05:17:55.784', '', '', '', '', '', '20', '', '3', '217', '899', '16', ''], ['05:17:55.784', '', '', '', '', '', '20', '', '3', '217', '899', '17', ''], ['05:17:55.784', '', '', '', '', '', '20', '', '3', '217', '899', '18', ''], ['05:17:55.786', '268', '4', '', '-67.66', '', '', '', '', '', '', '', ''], ['05:17:55.788', '', '', '28', '', '13', '18', '2', '3', '185', '900', '0', '2'], ['05:17:55.788', '', '', '', '', '', '20', '', '3', '185', '900', '1', ''], ['05:17:55.788', '', '', '', '', '', '20', '', '3', '185', '900', '2', ''], ['05:17:55.788', '', '', '', '', '', '16', '', '3', '41', '900', '5', ''], ['05:17:55.788', '', '', '', '', '', '17', '', '3', '185', '900', '6', ''], ['05:17:55.791', '', '', '', '', '', '20', '', '3', '105', '900', '7', ''], ['05:17:55.791', '', '', '', '', '', '20', '', '3', '89', '900', '8', ''], ['05:17:55.791', '', '', '', '', '', '18', '', '3', '217', '900', '10', ''], ['05:17:55.791', '', '', '', '', '', '20', '', '3', '217', '900', '11', ''], ['05:17:55.791', '', '', '', '', '', '20', '', '3', '25', '900', '12', ''], ['05:17:55.806', '268', '4', '', '-67.50', '', '', '', '', '', '', '', ''], ['05:17:55.808', '', '', '28', '', '12', '31', '2', '3', '185', '902', '0', '1'], ['05:17:55.808', '', '', '', '', '', '31', '', '3', '185', '902', '1', ''], ['05:17:55.808', '', '', '', '', '', '20', '', '3', '25', '902', '2', ''], ['05:17:55.808', '', '', '', '', '', '20', '', '3', '25', '902', '3', ''], ['05:17:55.808', '', '', '', '', '', '16', '', '3', '217', '902', '5', ''], ['05:17:55.808', '', '', '', '', '', '16', '', '3', '217', '902', '6', ''], ['05:17:55.811', '', '', '', '', '', '20', '', '3', '89', '902', '7', ''], ['05:17:55.811', '', '', '', '', '', '20', '', '3', '121', '902', '8', ''], ['05:17:55.811', '', '', '', '', '', '18', '', '3', '217', '902', '10', ''], ['05:17:55.811', '', '', '', '', '', '20', '', '3', '217', '902', '11', ''], ['05:17:55.811', '', '', '', '', '', '20', '', '3', '73', '902', '12', ''], ['05:17:55.811', '', '', '', '', '', '20', '', '3', '9', '902', '15', ''], ['05:17:55.815', '', '', '', '', '', '20', '', '3', '217', '902', '16', ''], ['05:17:55.815', '', '', '', '', '', '20', '', '3', '25', '902', '17', ''], ['05:17:55.815', '', '', '', '', '', '20', '', '3', '217', '902', '18', ''], ['05:17:55.815', '', '', '', '', '', '18', '', '3', '217', '903', '0', ''], ['05:17:55.815', '', '', '', '', '', '21', '', '3', '217', '903', '1', ''], ['05:17:55.815', '', '', '', '', '', '19', '', '3', '105', '903', '2', ''], ['05:17:55.815', '', '', '', '', '', '21', '', '3', '41', '903', '3', ''], ['05:17:55.823', '', '', '', '', '', '21', '', '3', '217', '903', '11', ''], ['05:17:55.823', '', '', '', '', '', '21', '', '3', '9', '903', '12', ''], ['05:17:55.823', '', '', '', '', '', '21', '', '3', '105', '903', '13', ''], ['05:17:55.823', '', '', '', '', '', '21', '', '3', '217', '903', '15', ''], ['05:17:55.823', '', '', '', '', '', '21', '', '3', '217', '903', '16', ''], ['05:17:55.823', '', '', '', '', '', '21', '', '3', '121', '903', '17', ''], ['05:17:55.823', '', '', '', '', '', '21', '', '3', '89', '903', '18', ''], ['05:17:55.826', '268', '4', '', '-67.51', '', '', '', '', '', '', '', ''], ['05:17:55.828', '', '', '28', '', '12', '18', '2', '3', '185', '904', '0', '1'], ['05:17:55.828', '', '', '', '', '', '21', '', '3', '185', '904', '1', ''], ['05:17:55.828', '', '', '', '', '', '21', '', '3', '185', '904', '2', ''], ['05:17:55.828', '', '', '', '', '', '21', '', '3', '185', '904', '3', ''], ['05:17:55.828', '', '', '', '', '', '17', '', '3', '217', '904', '5', ''], ['05:17:55.828', '', '', '', '', '', '17', '', '3', '217', '904', '6', ''], ['05:17:55.831', '', '', '', '', '', '21', '', '3', '217', '904', '7', ''], ['05:17:55.831', '', '', '', '', '', '20', '', '3', '169', '904', '11', ''], ['05:17:55.831', '', '', '', '', '', '20', '', '3', '217', '904', '12', ''], ['05:17:55.831', '', '', '', '', '', '20', '', '3', '217', '904', '13', ''], ['05:17:55.846', '268', '4', '', '-67.01', '', '', '', '', '', '', '', ''], ['05:17:55.848', '', '', '28', '', '13', '19', '2', '3', '57', '906', '1', '2'], ['05:17:55.848', '', '', '', '', '', '19', '', '3', '41', '906', '2', ''], ['05:17:55.848', '', '', '', '', '', '19', '', '3', '73', '906', '3', ''], ['05:17:55.848', '', '', '', '', '', '16', '', '3', '217', '906', '5', ''], ['05:17:55.848', '', '', '', '', '', '16', '', '3', '217', '906', '6', ''], ['05:17:55.848', '', '', '', '', '', '19', '', '3', '9', '906', '7', ''], ['05:17:55.851', '', '', '', '', '', '20', '', '3', '121', '906', '11', ''], ['05:17:55.851', '', '', '', '', '', '20', '', '3', '57', '906', '12', ''], ['05:17:55.851', '', '', '', '', '', '20', '', '3', '105', '906', '13', ''], ['05:17:55.855', '', '', '', '', '', '20', '', '3', '217', '906', '15', ''], ['05:17:55.855', '', '', '', '', '', '20', '', '3', '217', '906', '16', ''], ['05:17:55.855', '', '', '', '', '', '20', '', '3', '105', '906', '17', ''], ['05:17:55.855', '', '', '', '', '', '17', '', '3', '185', '907', '0', ''], ['05:17:55.855', '', '', '', '', '', '20', '', '3', '217', '907', '1', ''], ['05:17:55.855', '', '', '', '', '', '20', '', '3', '9', '907', '2', ''], ['05:17:55.864', '', '', '', '', '', '20', '', '3', '217', '907', '11', ''], ['05:17:55.864', '', '', '', '', '', '20', '', '3', '57', '907', '12', ''], ['05:17:55.864', '', '', '', '', '', '20', '', '3', '153', '907', '13', ''], ['05:17:55.864', '', '', '', '', '', '20', '', '3', '217', '907', '15', ''], ['05:17:55.864', '', '', '', '', '', '20', '', '3', '217', '907', '16', ''], ['05:17:55.864', '', '', '', '', '', '20', '', '3', '57', '907', '17', ''], ['05:17:55.864', '', '', '', '', '', '20', '', '3', '105', '907', '18', ''], ['05:17:55.867', '', '', '', '', '', '17', '', '3', '185', '908', '0', ''], ['05:17:55.867', '', '', '', '', '', '20', '', '3', '185', '908', '1', ''], ['05:17:55.867', '', '', '', '', '', '20', '', '3', '9', '908', '2', ''], ['05:17:55.867', '', '', '', '', '', '16', '', '3', '73', '908', '6', ''], ['05:17:55.868', '268', '4', '28', '-66.79', '13', '', '2', '', '', '', '', '2'], ['05:17:55.871', '', '', '', '', '', '20', '', '3', '105', '908', '7', ''], ['05:17:55.871', '', '', '', '', '', '20', '', '3', '25', '908', '8', ''], ['05:17:55.871', '', '', '', '', '', '17', '', '3', '217', '908', '10', ''], ['05:17:55.871', '', '', '', '', '', '21', '', '3', '217', '908', '11', ''], ['05:17:55.871', '', '', '', '', '', '21', '', '3', '9', '908', '12', ''], ['05:17:55.871', '', '', '', '', '', '21', '', '3', '121', '908', '13', ''], ['05:17:55.875', '', '', '', '', '', '21', '', '3', '217', '908', '15', ''], ['05:17:55.875', '', '', '', '', '', '21', '', '3', '217', '908', '16', ''], ['05:17:55.875', '', '', '', '', '', '21', '', '3', '57', '908', '17', ''], ['05:17:55.875', '', '', '', '', '', '18', '', '3', '73', '909', '0', ''], ['05:17:55.875', '', '', '', '', '', '21', '', '3', '217', '909', '1', ''], ['05:17:55.875', '', '', '', '', '', '21', '', '3', '89', '909', '2', ''], ['05:17:55.875', '', '', '', '', '', '21', '', '3', '89', '909', '3', ''], ['05:17:55.886', '268', '4', '', '-67.48', '', '', '', '', '', '', '', ''], ['05:17:55.888', '', '', '28', '', '12', '31', '2', '3', '185', '910', '0', '1'], ['05:17:55.888', '', '', '', '', '', '21', '', '3', '89', '910', '1', ''], ['05:17:55.888', '', '', '', '', '', '21', '', '3', '9', '910', '2', ''], ['05:17:55.888', '', '', '', '', '', '21', '', '3', '185', '910', '3', ''], ['05:17:55.888', '', '', '', '', '', '17', '', '3', '217', '910', '5', ''], ['05:17:55.888', '', '', '', '', '', '17', '', '3', '217', '910', '6', ''], ['05:17:55.891', '', '', '', '', '', '21', '', '3', '89', '910', '7', ''], ['05:17:55.891', '', '', '', '', '', '21', '', '3', '73', '910', '8', ''], ['05:17:55.891', '', '', '', '', '', '18', '', '3', '217', '910', '10', ''], ['05:17:55.891', '', '', '', '', '', '21', '', '3', '217', '910', '11', ''], ['05:17:55.891', '', '', '', '', '', '21', '', '3', '57', '910', '12', ''], ['05:17:55.900', '', '', '', '', '', '21', '', '3', '217', '911', '3', ''], ['05:17:55.900', '', '', '', '', '', '17', '', '3', '217', '911', '5', ''], ['05:17:55.900', '', '', '', '', '', '17', '', '3', '217', '911', '6', ''], ['05:17:55.900', '', '', '', '', '', '21', '', '3', '105', '911', '7', ''], ['05:17:55.900', '', '', '', '', '', '21', '', '3', '25', '911', '8', ''], ['05:17:55.900', '', '', '', '', '', '18', '', '3', '217', '911', '10', ''], ['05:17:55.903', '', '', '', '', '', '21', '', '3', '217', '911', '11', ''], ['05:17:55.903', '', '', '', '', '', '21', '', '3', '57', '911', '12', ''], ['05:17:55.903', '', '', '', '', '', '21', '', '3', '153', '911', '13', ''], ['05:17:55.903', '', '', '', '', '', '21', '', '3', '217', '911', '15', ''], ['05:17:55.903', '', '', '', '', '', '21', '', '3', '217', '911', '16', ''], ['05:17:55.903', '', '', '', '', '', '21', '', '3', '137', '911', '17', ''], ['05:17:55.906', '268', '4', '', '-67.79', '', '', '', '', '', '', '', ''], ['05:17:55.908', '', '', '28', '', '13', '18', '2', '3', '57', '912', '0', '2'], ['05:17:55.908', '', '', '', '', '', '21', '', '3', '185', '912', '1', ''], ['05:17:55.908', '', '', '', '', '', '21', '', '3', '57', '912', '2', ''], ['05:17:55.908', '', '', '', '', '', '17', '', '3', '137', '912', '5', ''], ['05:17:55.908', '', '', '', '', '', '17', '', '3', '169', '912', '6', ''], ['05:17:55.923', '', '', '', '', '', '21', '', '3', '217', '913', '11', ''], ['05:17:55.923', '', '', '', '', '', '21', '', '3', '89', '913', '12', ''], ['05:17:55.926', '268', '4', '', '-68.13', '', '', '', '', '', '', '', ''], ['05:17:55.928', '', '', '28', '', '13', '31', '2', '3', '185', '914', '0', '2'], ['05:17:55.928', '', '', '', '', '', '21', '', '3', '105', '914', '2', ''], ['05:17:55.928', '', '', '', '', '', '17', '', '3', '25', '914', '5', ''], ['05:17:55.928', '', '', '', '', '', '17', '', '3', '121', '914', '6', ''], ['05:17:55.928', '', '', '', '', '', '21', '', '3', '25', '914', '7', ''], ['05:17:55.931', '', '', '', '', '', '18', '', '3', '89', '914', '10', ''], ['05:17:55.931', '', '', '', '', '', '21', '', '3', '217', '914', '11', ''], ['05:17:55.931', '', '', '', '', '', '21', '', '3', '73', '914', '12', ''], ['05:17:55.939', '', '', '', '', '', '17', '', '3', '137', '915', '5', ''], ['05:17:55.939', '', '', '', '', '', '17', '', '3', '153', '915', '6', ''], ['05:17:55.939', '', '', '', '', '', '21', '', '3', '73', '915', '7', ''], ['05:17:55.939', '', '', '', '', '', '18', '', '3', '153', '915', '10', ''], ['05:17:55.943', '', '', '', '', '', '21', '', '3', '217', '915', '11', ''], ['05:17:55.943', '', '', '', '', '', '21', '', '3', '137', '915', '12', ''], ['05:17:55.943', '', '', '', '', '', '21', '', '3', '137', '915', '15', ''], ['05:17:55.943', '', '', '', '', '', '21', '', '3', '217', '915', '16', ''], ['05:17:55.943', '', '', '', '', '', '21', '', '3', '105', '915', '17', ''], ['05:17:55.946', '268', '4', '', '-67.45', '', '', '', '', '', '', '', ''], ['05:17:55.948', '', '', '28', '', '9', '30', '3', '3', '160', '916', '0', '3'], ['05:17:55.948', '', '', '', '', '', '21', '', '3', '121', '916', '1', ''], ['05:17:55.948', '', '', '', '', '', '21', '', '3', '105', '916', '2', ''], ['05:17:55.948', '', '', '', '', '', '17', '', '3', '73', '916', '5', ''], ['05:17:55.948', '', '', '', '', '', '17', '', '3', '137', '916', '6', ''], ['05:17:55.959', '', '', '', '', '', '13', '', '4', '217', '917', '3', ''], ['05:17:55.959', '', '', '', '', '', '11', '', '4', '217', '917', '5', ''], ['05:17:55.959', '', '', '', '', '', '11', '', '4', '217', '917', '6', ''], ['05:17:55.959', '', '', '', '', '', '13', '', '4', '217', '917', '7', ''], ['05:17:55.959', '', '', '', '', '', '13', '', '4', '217', '917', '8', ''], ['05:17:55.959', '', '', '', '', '', '11', '', '4', '153', '917', '10', ''], ['05:17:55.963', '', '', '', '', '', '13', '', '4', '217', '917', '11', ''], ['05:17:55.963', '', '', '', '', '', '13', '', '4', '121', '917', '12', ''], ['05:17:55.966', '268', '4', '', '-67.22', '', '', '', '', '', '', '', ''], ['05:17:55.968', '', '', '28', '', '12', '14', '2', '4', '57', '918', '1', '2'], ['05:17:55.968', '', '', '', '', '', '14', '', '4', '185', '918', '2', ''], ['05:17:55.968', '', '', '', '', '', '12', '', '4', '169', '918', '5', ''], ['05:17:55.983', '', '', '', '', '', '14', '', '4', '57', '919', '11', ''], ['05:17:55.983', '', '', '', '', '', '14', '', '4', '217', '919', '12', ''], ['05:17:55.983', '', '', '', '', '', '14', '', '4', '9', '919', '15', ''], ['05:17:55.983', '', '', '', '', '', '14', '', '4', '217', '919', '16', ''], ['05:17:55.983', '', '', '', '', '', '14', '', '4', '217', '919', '17', ''], ['05:17:55.986', '268', '4', '', '-67.80', '', '', '', '', '', '', '', ''], ['05:17:55.988', '', '', '28', '', '13', '14', '2', '4', '9', '920', '1', '1'], ['05:17:55.988', '', '', '', '', '', '14', '', '4', '41', '920', '2', ''], ['05:17:55.988', '', '', '', '', '', '14', '', '4', '57', '920', '3', ''], ['05:17:55.988', '', '', '', '', '', '12', '', '4', '217', '920', '5', ''], ['05:17:55.988', '', '', '', '', '', '12', '', '4', '217', '920', '6', ''], ['05:17:55.988', '', '', '', '', '', '14', '', '4', '41', '920', '7', ''], ['05:17:55.991', '', '', '', '', '', '14', '', '4', '89', '920', '8', ''], ['05:17:55.991', '', '', '', '', '', '22', '', '3', '217', '920', '11', ''], ['05:17:55.991', '', '', '', '', '', '22', '', '3', '89', '920', '12', ''], ['05:17:56.003', '', '', '', '', '', '22', '', '3', '25', '921', '11', ''], ['05:17:56.003', '', '', '', '', '', '22', '', '3', '121', '921', '12', ''], ['05:17:56.003', '', '', '', '', '', '22', '', '3', '25', '921', '13', ''], ['05:17:56.003', '', '', '', '', '', '22', '', '3', '217', '921', '15', ''], ['05:17:56.003', '', '', '', '', '', '22', '', '3', '217', '921', '16', ''], ['05:17:56.003', '', '', '', '', '', '22', '', '3', '217', '921', '17', ''], ['05:17:56.006', '268', '4', '', '-67.31', '', '', '', '', '', '', '', ''], ['05:17:56.008', '', '', '28', '', '10', '22', '3', '3', '9', '922', '1', '3'], ['05:17:56.008', '', '', '', '', '', '22', '', '3', '73', '922', '2', ''], ['05:17:56.008', '', '', '', '', '', '17', '', '3', '121', '922', '5', ''], ['05:17:56.008', '', '', '', '', '', '17', '', '3', '185', '922', '6', ''], ['05:17:56.011', '', '', '', '', '', '22', '', '3', '217', '922', '7', ''], ['05:17:56.011', '', '', '', '', '', '22', '', '3', '121', '922', '11', ''], ['05:17:56.011', '', '', '', '', '', '22', '', '3', '89', '922', '12', ''], ['05:17:56.020', '', '', '', '', '', '17', '', '3', '105', '923', '5', ''], ['05:17:56.020', '', '', '', '', '', '17', '', '3', '185', '923', '6', ''], ['05:17:56.020', '', '', '', '', '', '22', '', '3', '25', '923', '7', ''], ['05:17:56.020', '', '', '', '', '', '31', '', '3', '112', '923', '10', ''], ['05:17:56.023', '', '', '', '', '', '31', '', '3', '112', '923', '11', ''], ['05:17:56.023', '', '', '', '', '', '22', '', '3', '217', '923', '12', ''], ['05:17:56.023', '', '', '', '', '', '22', '', '3', '217', '923', '13', ''], ['05:17:56.023', '', '', '', '', '', '22', '', '3', '217', '923', '15', ''], ['05:17:56.023', '', '', '', '', '', '22', '', '3', '217', '923', '16', ''], ['05:17:56.023', '', '', '', '', '', '22', '', '3', '217', '923', '17', ''], ['05:17:56.023', '', '', '', '', '', '22', '', '3', '217', '923', '18', ''], ['05:17:56.027', '', '', '', '', '', '18', '', '3', '57', '924', '0', ''], ['05:17:56.027', '', '', '', '', '', '22', '', '3', '41', '924', '1', ''], ['05:17:56.027', '', '', '', '', '', '22', '', '3', '185', '924', '2', ''], ['05:17:56.027', '', '', '', '', '', '22', '', '3', '185', '924', '3', ''], ['05:17:56.027', '', '', '', '', '', '17', '', '3', '73', '924', '5', ''], ['05:17:56.027', '', '', '', '', '', '17', '', '3', '217', '924', '6', ''], ['05:17:56.028', '268', '4', '28', '-67.68', '13', '', '2', '', '', '', '', '2'], ['05:17:56.039', '', '', '', '', '', '22', '', '3', '217', '925', '3', ''], ['05:17:56.039', '', '', '', '', '', '17', '', '3', '217', '925', '5', ''], ['05:17:56.039', '', '', '', '', '', '17', '', '3', '217', '925', '6', ''], ['05:17:56.039', '', '', '', '', '', '22', '', '3', '217', '925', '7', ''], ['05:17:56.039', '', '', '', '', '', '18', '', '3', '57', '925', '10', ''], ['05:17:56.043', '', '', '', '', '', '22', '', '3', '73', '925', '16', '']]
colNames = ["Time","Col2","Col3","Col4","Col5","Col6","Col7","Col8","Col9","Col10","Col11","Col12","Col13"]
df = pd.DataFrame(colVals, columns=colNames)
df.dtypes
Out[88]:
Time object
Col2 object
Col3 object
Col4 object
Col5 object
Col6 object
Col7 object
Col8 object
Col9 object
Col10 object
Col11 object
Col12 object
Col13 object
dtype: object
最佳答案
您可以通过 DataFrame.set_index
将 Time
列转换为索引,然后如果可能的话转换为 timedeltas 并将所有列转换为数字 to_numeric
使用 errors='coerce'
将非数值转换为 NaN
:
df = df.set_index('Time')
df.index = pd.to_timedelta(df.index)
df = df.apply(pd.to_numeric, errors='coerce')
print (df.dtypes)
Col2 float64
Col3 float64
Col4 float64
Col5 float64
Col6 float64
Col7 float64
Col8 float64
Col9 float64
Col10 float64
Col11 float64
Col12 float64
Col13 float64
dtype: object
如果还需要区分整数和 float ,可以使用 try- except
创建自定义函数:
colVals = [['05:17:55.703', '', '', '', '', '', '21', '', '3', '89', '891', '11', ''],
['05:17:55.703', '', '', '', '', '', '21', '', '3', '217', '891', '12', ''],
['05:17:55.703', '', '', '', '', '', '21', '', '3', '217', '891', '13', '']]
colNames = ["Time","Col2","Col3","Col4","Col5","Col6","Col7","Col8","Col9",
"Col10","Col11","Col12","Col13"]
df = pd.DataFrame(colVals, columns=colNames)
df = df.set_index('Time')
df.index = pd.to_timedelta(df.index)
def func(x):
try:
return x.astype(float).astype(int)
except:
return pd.to_numeric(x, errors='coerce')
df = df.apply(func)
print (df.dtypes)
Col2 float64
Col3 float64
Col4 float64
Col5 float64
Col6 float64
Col7 int32
Col8 float64
Col9 int32
Col10 int32
Col11 int32
Col12 int32
Col13 float64
dtype: object
关于python - Pandas - 在 pandas.DataFrame() 中强制使用具有大量缺失值的数据的自动数据类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58012458/
我在网上搜索但没有找到任何合适的文章解释如何使用 javascript 使用 WCF 服务,尤其是 WebScriptEndpoint。 任何人都可以对此给出任何指导吗? 谢谢 最佳答案 这是一篇关于
我正在编写一个将运行 Linux 命令的 C 程序,例如: cat/etc/passwd | grep 列表 |剪切-c 1-5 我没有任何结果 *这里 parent 等待第一个 child (chi
所以我正在尝试处理文件上传,然后将该文件作为二进制文件存储到数据库中。在我存储它之后,我尝试在给定的 URL 上提供文件。我似乎找不到适合这里的方法。我需要使用数据库,因为我使用 Google 应用引
我正在尝试制作一个宏,将下面的公式添加到单元格中,然后将其拖到整个列中并在 H 列中复制相同的公式 我想在 F 和 H 列中输入公式的数据 Range("F1").formula = "=IF(ISE
问题类似于this one ,但我想使用 OperatorPrecedenceParser 解析带有函数应用程序的表达式在 FParsec . 这是我的 AST: type Expression =
我想通过使用 sequelize 和 node.js 将这个查询更改为代码取决于在哪里 select COUNT(gender) as genderCount from customers where
我正在使用GNU bash,版本5.0.3(1)-发行版(x86_64-pc-linux-gnu),我想知道为什么简单的赋值语句会出现语法错误: #/bin/bash var1=/tmp
这里,为什么我的代码在 IE 中不起作用。我的代码适用于所有浏览器。没有问题。但是当我在 IE 上运行我的项目时,它发现错误。 而且我的 jquery 类和 insertadjacentHTMl 也不
我正在尝试更改标签的innerHTML。我无权访问该表单,因此无法编辑 HTML。标签具有的唯一标识符是“for”属性。 这是输入和标签的结构:
我有一个页面,我可以在其中返回用户帖子,可以使用一些 jquery 代码对这些帖子进行即时评论,在发布新评论后,我在帖子下插入新评论以及删除 按钮。问题是 Delete 按钮在新插入的元素上不起作用,
我有一个大约有 20 列的“管道分隔”文件。我只想使用 sha1sum 散列第一列,它是一个数字,如帐号,并按原样返回其余列。 使用 awk 或 sed 执行此操作的最佳方法是什么? Accounti
我需要将以下内容插入到我的表中...我的用户表有五列 id、用户名、密码、名称、条目。 (我还没有提交任何东西到条目中,我稍后会使用 php 来做)但由于某种原因我不断收到这个错误:#1054 - U
所以我试图有一个输入字段,我可以在其中输入任何字符,但然后将输入的值小写,删除任何非字母数字字符,留下“。”而不是空格。 例如,如果我输入: 地球的 70% 是水,-!*#$^^ & 30% 土地 输
我正在尝试做一些我认为非常简单的事情,但出于某种原因我没有得到想要的结果?我是 javascript 的新手,但对 java 有经验,所以我相信我没有使用某种正确的规则。 这是一个获取输入值、检查选择
我想使用 angularjs 从 mysql 数据库加载数据。 这就是应用程序的工作原理;用户登录,他们的用户名存储在 cookie 中。该用户名显示在主页上 我想获取这个值并通过 angularjs
我正在使用 autoLayout,我想在 UITableViewCell 上放置一个 UIlabel,它应该始终位于单元格的右侧和右侧的中心。 这就是我想要实现的目标 所以在这里你可以看到我正在谈论的
我需要与 MySql 等效的 elasticsearch 查询。我的 sql 查询: SELECT DISTINCT t.product_id AS id FROM tbl_sup_price t
我正在实现代码以使用 JSON。 func setup() { if let flickrURL = NSURL(string: "https://api.flickr.com/
我尝试使用for循环声明变量,然后测试cols和rols是否相同。如果是,它将运行递归函数。但是,我在 javascript 中执行 do 时遇到问题。有人可以帮忙吗? 现在,在比较 col.1 和
我举了一个我正在处理的问题的简短示例。 HTML代码: 1 2 3 CSS 代码: .BB a:hover{ color: #000; } .BB > li:after {
我是一名优秀的程序员,十分优秀!