Python 'TypeError: 'module' object is not callable' 错误解决 - time 模块调用问题
The error message suggests that the time module is not callable. This could happen if you have accidentally assigned a different value to the variable time earlier in your code.
To fix this issue, you can try renaming the variable tm1 to something else, such as start_time, and then use start_time = time.time() instead of tm1 = time(). Here's the updated code:
import time
start_time = time.time()
file_name = 'Z:/cs.xls'
rows = 10000
df = make_df_from_excel(file_name, nrows)
end_time = time.time() - start_time
print('jiesu', end_time)
This should resolve the issue and calculate the time taken by the make_df_from_excel function correctly.
原文地址: https://www.cveoy.top/t/topic/sCr 著作权归作者所有。请勿转载和采集!