标签: excel excel-formula
ColA ColB March 101 April 201 April 202 May 301 March 102 March 103 April 203 May 302
我试图找出一个允许我匹配ColA中的实例并在ColB中增加组的公式
答案 0 :(得分:0)
在B1放MachineName。在B2中:
MachineName
In [227]: df_sample.groupby('MachineName').apply(lambda x: x.DateTime.diff()) Out[227]: MachineName BMTSAFT04 0 NaT 1 05:06:03.140000 2 01:27:55.607000 3 00:15:04.731000 4 13:11:38.725000 BMTSYSP05 5 NaT 6 05:53:03.979000 Name: DateTime, dtype: timedelta64[ns]
然后复制。