我试图使用dplyr取消选择我的数据集中的列,但自昨晚以来我无法实现这一点.
我很清楚工作,但我正在严格尝试通过dplyr找到答案.
library(dplyr)
df <- tibble(x = c(1,2,3,4), y = c('a','b','c','d'))
df %>% select(-c('x'))
Run Code Online (Sandbox Code Playgroud)
给我一个错误:-c("x")出错:一元运算符的参数无效
现在,我知道select接受了不带引号的值,但我无法以这种方式进行子选择.
请注意上面的数据集只是一个例子,我们可以有很多列.
谢谢,
Prerit
我想编写一个脚本来连接我的FTP服务器,但是对我来说不起作用。
from ftplib import FTP
ftp=FTP()
ftp.set_debuglevel(2)
ftp.connect('192.169.137.100')
ftp.login('test','test')
ftp.dir()
ftp.close()
Run Code Online (Sandbox Code Playgroud)
在构建此脚本时,我得到了这些信息
*get* '220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------\r\n'
*get* '220-You are user number 1 of 50 allowed.\r\n'
*get* '220-Local time is now 23:46. Server port: 21.\r\n'
*get* '220-This is a private system - No anonymous login\r\n'
*get* '220 You will be disconnected after 15 minutes of inactivity.\r\n'
*resp* '220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------\n220-You are user number 1 of 50 allowed.\n220-Local time is now 23:46. Server port: …Run Code Online (Sandbox Code Playgroud) 我一直在阅读Numpy的一份非常古老的文档,发现了一个奇怪的符号,它让我无法理解。文档说a[i:...]是 的快捷方式a[i,:,:,:]。
旧的文档非常模糊,我欢迎任何评论。
谢谢,普里特