我是 ruby 和命令行的新手。
Ruby -v: ruby 2.3.7p456(2018-03-28 修订版 63024)[universal.x86_64-darwin18]
苹果电脑:莫哈韦沙漠 10.14.2
我正在尝试在本地主机上打开我的 Jekyll 博客,这之前没有给我带来问题。然而我跑了
bundle exec jekyll serve
Run Code Online (Sandbox Code Playgroud)
并得到这个错误:
Could not find eventmachine-1.2.7 in any of the sources
Run `bundle install` to install missing gems.
Run Code Online (Sandbox Code Playgroud)
按照建议,然后我运行
bundle install
Run Code Online (Sandbox Code Playgroud)
并得到这个错误:
Ignoring ffi-1.9.25 because its extensions are not built. Try: gem pristine ffi --version 1.9.25
Ignoring http_parser.rb-0.6.0 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.6.0
Fetching gem metadata from https://rubygems.org/...........
Using rake 10.5.0
Using public_suffix 3.0.3
Using …Run Code Online (Sandbox Code Playgroud) 我有这个数据框:
df = pd.DataFrame({"A": ["Used", "Not used", "Not used", "Not used", "Used",
"Not used", "Used", "Used", "Used", "Not used"],
"B": ["Used", "Used", "Used", "Not used", "Not used",
"Used", "Not used", "Not used", "Used", "Not used"]})
Run Code Online (Sandbox Code Playgroud)
我想找到最快,最干净的方法来找出以下内容:
我是Python和pandas(以及一般编码)的新手,所以我确信这很简单,但任何指导都会受到赞赏.我已经尝试过groupby().aggregate(sum)但是我没有得到我需要的结果(我想是因为这些是字符而不是整数.