简体   繁体   English

如何使用 python 和以下数据计算斜率?

[英]How to calculate slope using python with the data below?

My data looks like this:我的数据如下所示:

附资料

Can you please let me know how to calculate slope in this case when there blank values?在这种情况下,当有空白值时,你能告诉我如何计算斜率吗?

If you get an error, you can just use the try, except tool in python.如果遇到错误,您可以使用 try, 除了 python 中的工具。 It first tries the statement you give it, and if it gives an error back you can skip that exception, print an error, etc.它首先尝试你给它的语句,如果它返回一个错误,你可以跳过那个异常,打印一个错误,等等。

try: 
   slope = [slope calculation]
except:
   print 'not enough data'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM