您好我在这里也找到了以下代码...但是这会导致所有链接复制到工作表中....如果我只想从特定链接名称复制URL怎么办?请帮我编码。例如,使用以下代码...我想要这个链接名称的URL“Excel VBA入门 - 我是程序员”。应该在单元格A1“http://www.i-programmer.info/ebooks/automating-excel/1264-getting-started.html”中生成一个URL 看到图像......提前致谢!!!
from statsmodels.tsa.stattools import ARMA
import pandas as pd
import numpy as np
ts = pd.Series(np.random.randn(500), index=pd.date_range('2010-01-01', periods=500))
p, q = 1, 1
arma = ARMA(endog=ts, order=(p, q)).fit()
print arma.summary()
ARMA Model Results
==============================================================================
Dep. Variable: y No. Observations: 500
Model: ARMA(1, 1) Log Likelihood -678.805
Method: css-mle S.D. of innovations 0.941
Date: Tue, 17 May 2016 AIC 1365.610
Time: 00:01:52 BIC 1382.469
Sample: 01-01-2010 HQIC 1372.225
- 05-15-2011
==============================================================================
coef std err z P>|z| [95.0% Conf. Int.]
------------------------------------------------------------------------------
const 0.0624 0.048 1.311 0.191 -0.031 0.156
ar.L1.y 0.3090 0.311 0.992 0.322 -0.302 0.919
ma.L1.y -0.2177 0.318 -0.684 0.494 -0.841 0.406
Roots
=============================================================================
Real Imaginary Modulus Frequency
-----------------------------------------------------------------------------
AR.1 3.2367 +0.0000j 3.2367 0.0000
MA.1 4.5939 +0.0000j 4.5939 0.0000
-----------------------------------------------------------------------------
答案 0 :(得分:0)
在将URL添加到工作表之前,您可以检查innerText
属性的值
For Each h In header_links
If h.innerText = "Getting started with Excel VBA - I Programmer" Then
Set link = h.ChildNodes.Item(0)
Cells(Range("A" & Rows.Count).End(xlUp).Row + 1, 1) = link.href
End If
Next