Python数据分析:利用Jupyter Notebook进行Python与SQL的数据分析
发布时间
阅读量:
阅读量
与在jupyter环境中操作R语言的方式相似,SQL语句同样具备可应用性:
具体信息可参考github上的相关项目:https://github.com/catherinedevlin/ipython-sql>
ipython-sql安装指南
使用命令 pip install ipython-sql 可完成相关软件包的安装操作。
载入
%load_ext sql
连接数据库 同 SQLAlchemy
- postgresql://will:longliveliz@localhost/shakes
- mysql+pymysql://scott:tiger@localhost/foo
- oracle://scott:tiger@127.0.0.1:1521/sidname
- sqlite://
- sqlite:///foo.db
- mssql+pyodbc://username:password@host/databasedriver=SQL+Server+Native+Client+11.0
当前所采用的数据库类型为mysql,连接方式为本地连接,对应的账户名称为ffzs,密码设置为666666,所使用的数据库为test:
`%sql mysql+pymysql://ffzs:666666@loca
全部评论 (0)
还没有任何评论哟~
