我已经改变了值,但是我无法使用diffinv()来区别它
ds_sqrt=np.sqrt(ds)
ds_sqrt=pd.DataFrame(ds_sqrt)
ds_diff=ds_sqrt.diff().values
Run Code Online (Sandbox Code Playgroud)
谁能说出如何与众不同?
我需要在单行中应用 if else 条件和 for 循环。我需要一次更新“RL”和“RM”并将其他值更新为“其他”。怎么做??。有可能吗??
train['MSZoning']=['RL' if x=='RL' else 'Others' for x in train['MSZoning']]
Run Code Online (Sandbox Code Playgroud) 当我尝试执行时conda env create -f virtual_platform_windows.yml
它显示
ResolvePackageNotFound:
- pytorch==0.1.12=py35_0.1.12cu80
Run Code Online (Sandbox Code Playgroud)
我尝试为 Windows 安装 pytorch,但仍然出现错误。如何解决这个问题?
我试图使用selenium与python刮取youtube评论.下面是只删除一个注释并抛出错误的代码
driver = webdriver.Chrome()
url="https://www.youtube.com/watch?v=MNltVQqJhRE"
driver.get(url)
wait(driver, 5500)
driver.execute_script("window.scrollTo(0, document.body.scrollHeight + 500);")
driver.implicitly_wait(5000)
#content = driver.find_element_by_xpath('//*[@id="contents"]')
comm=driver.find_element_by_xpath('//div[@class="style-scope ytd-item-section-renderer"]')
comm1=comm.find_elements_by_xpath('//yt-formatted-string[@id="content-text"]')
#print(comm.text)
for i in range(50):
print(comm1[i].text,end=' ')
Run Code Online (Sandbox Code Playgroud)
这是我得到的输出.如何获得该页面上的所有评论??? 谁能帮我这个.
Being a sucessful phyton freelancer really mean to me because if I able to make $2000 in month I can really help my family financial, improve my skill, and have a lot of time to refreshing. So thanks Qazi, you really help me :D
Traceback (most recent call last):
File "C:\Python36\programs\Web scrap\YT_Comm.py", …Run Code Online (Sandbox Code Playgroud) python-3.x ×4
python ×2
anaconda ×1
arrays ×1
numpy ×1
pandas ×1
pytorch ×1
scikit-learn ×1
selenium ×1
virtualenv ×1