spyder

好工具推荐系列:Python IDE之Spyder和Jupyter

☆樱花仙子☆ 提交于 2020-08-06 19:54:22
IDE流行度 KDnuggets2018年的一个博客发起了一项投票:数据科学中最好用的Python IDE是什么?本次调查共有1900多人参与,调查结果如下图所示。前5个选择是: Jupyter,57% PyCharm,35% Spyder,27% Visual Studio Code,21% Sublime Text,12% IDE用途 如果是web开发或大工程,建议使用PyCharm; 如果是数据处理,建议Spyder;Spyder是使用PyQt开发的GUI。 而Jupyter Notebook 已迅速成为数据分析,机器学习的必备工具。因为它可以让数据分析师集中精力向用户解释整个分析过程。 Jupyter这个名字是它要服务的三种语言的缩写:Julia,Python和R,这个名字与“木星(jupiter)”谐音。 IDE官网 1.Spyder https://www.spyder-ide.org/ https://github.com/spyder-ide/spyder https://pypi.org/project/spyder/ 2.Jupyter https://github.com/jupyter/notebook https://github.com/jupyter/jupyter 3.Pycharm https://www.jetbrains.com/pycharm

戏精程序员,用python开发了一个女朋友,天天秀恩爱

自闭症网瘾萝莉.ら 提交于 2020-08-06 05:36:31
很多人都知道,程序员大部分都是单身狗,然而,无奈Python实在太强大,居然可以用来开发一个女朋友出来。 其实,这个女朋友类似很多视频中,那些假装自己有女朋友或男朋友的人一样,也是在假装哦,但是程序员的用python假装自己有女朋友,要比他们更加真实。 那么,今天,我就教大家如何用python开发一个“女朋友”吧。 首先准备运行环境 运行平台是:Mac Python版本:Python3.6 IDE:spyder 模块:wxpy(pip install wxpy) 指定聊天的对象,然后厚脸皮开始进行表白吧! 实现效果如下: 可以由自己随意找一个群,然后开始自动回复群里的消息。 然后开始自动与所有人聊天,并且如果因为好友太多,信息太多,还可以通过这个机器人一键回复所有人的消息,还能并行执行。 实现的效果图 怎么样?有没有羡慕到呢?这个用python开发出来的“女朋友”,虽然不能用来拍照,但可以聊天,还可以用来感受女朋友的关心哦! 好吧,说实话,这是一个python入门项目,因为比较有趣,所以拿出来分享给大家。 来源: oschina 链接: https://my.oschina.net/u/4588581/blog/4454443

module 'xlwings' has no attribute 'Book'

爷,独闯天下 提交于 2020-08-05 10:05:48
问题 I'm trying to use xlwings for the first time but I can't quite understand the documentation. From the section "Quickstart" I read import xlwings as xw wb = xw.Book() # this will create a new workbook When I try this "at home", I have no problem importing xlwings but with the second script I get this error: AttributeError: module 'xlwings' has no attribute 'Book' When I try to see the attributes of xw I can see AboveBelow,ActionTime etc. but not Book. Can you help please? Thank you very much.

module 'xlwings' has no attribute 'Book'

ε祈祈猫儿з 提交于 2020-08-05 10:04:48
问题 I'm trying to use xlwings for the first time but I can't quite understand the documentation. From the section "Quickstart" I read import xlwings as xw wb = xw.Book() # this will create a new workbook When I try this "at home", I have no problem importing xlwings but with the second script I get this error: AttributeError: module 'xlwings' has no attribute 'Book' When I try to see the attributes of xw I can see AboveBelow,ActionTime etc. but not Book. Can you help please? Thank you very much.

Spyder plugins (spyder-autopep8)

99封情书 提交于 2020-08-05 06:29:18
问题 So I'm trying to install the spyder-autopep8 plugin from here: https://github.com/spyder-ide/spyder-autopep8 I downloaded and unzipped it and ran python setup.py install as instructed. (This is inside my ../.spyder-py3/plugins folder) My question is how do I use this inside Spyder? The instructions from the README (link above) says to hit F8 or go to Source > Run autopep8 code autoformatting . But right now, the default F8 for me is Source > Run static code analysis . Thanks!! 回答1: just

How can I display a <IPython.core.display.HTML object> in spyder IPython console?

青春壹個敷衍的年華 提交于 2020-08-04 09:10:07
问题 I am trying to run the code: perm = PermutationImportance(clf).fit(X_test, y_test) eli5.show_weights(perm) to get an idea of which features are the most important in a model, but the output is <IPython.core.display.HTML object> Any solutions or workarounds to this problem? Thank you for your suggestions! 回答1: ( Spyder maintainer here ) There are no workarounds nor solutions available at the moment (February 2019) to display web content in our consoles, sorry. Note : We are considering how to

pycountry didn't return correct value

风格不统一 提交于 2020-07-10 03:13:29
问题 I try to find the name of a country through the name of a city. pycountry did the work for me! import pycountry pycountry.countries.search_fuzzy('beja') Out[5]: [Country(alpha_2='PT', alpha_3='PRT', name='Portugal', numeric='620', official_name='Portuguese Republic'), Country(alpha_2='TN', alpha_3='TUN', name='Tunisia', numeric='788', official_name='Republic of Tunisia'), Country(alpha_2='DZ', alpha_3='DZA', name='Algeria', numeric='012', official_name="People's Democratic Republic of Algeria

How to supress 'star imports' warnings from Spyder IDE?

僤鯓⒐⒋嵵緔 提交于 2020-07-06 11:11:21
问题 While working on Spyder and importing some libraries as: from OpenGL.GL import * I get this waning message at every line containing functions from those libraries: somefunction may be undefined or defined from star imports The warnings are harmless but it is quite annoying to see all my code underlined in yellow. Is there any way to supress specifically those warnings? 回答1: this seems to work for me from OpenGL.GL import * # analysis:ignore 来源: https://stackoverflow.com/questions/46799137/how

Using Plotly in Python Spyder IDE

有些话、适合烂在心里 提交于 2020-07-03 07:56:54
问题 Is it possible to use plotly in the Spyder IDE to produce figures that show only in Spyder instead of the browser? I'm not bothered about the interactivity of the plot, I just want to see the figures in the IDE. If I run the following code it just opens in the browser. If I change the last line to pyo.iplot instead of plot, it just does nothing. I'm a bit lost! import plotly.offline as pyo from plotly.graph_objs import Figure, Data pyo.offline.init_notebook_mode() x = list(range(10)) y = [22

how to install selenium

时间秒杀一切 提交于 2020-06-28 06:36:45
问题 I am using python 3.5.2, when am tryng to import the selenium it is throwing an error No module named selenium below is my code: from selenium import webdriver 回答1: You should install the selenium package first. pip install selenium 回答2: I installed selenium through pip install selenium like yan said, but I still received the same error. The problem in my case was that selenium was installed on a different drive than my project was on (i.e. project was on D:, selenium was on C:). Moving both