WRDS库和SQL?

时间:2016-11-18 02:00:56

标签: python spyder wrds-compusat wrds

我正在使用WRDS库通过Spyder连接到WRDS数据库。我导入wrds。根据WRDS网站,查询应如下所示: result = wrds.sql('select * from dataset', 'variable')

https://wrds-web.wharton.upenn.edu/wrds/support/Accessing%20and%20Manipulating%20the%20Data/_004Python%20Programming/_001Using%20Python%20with%20WRDS.cfm

但是,我收到此错误:AttributeError: module 'wrds' has no attribute 'sql'

1 个答案:

答案 0 :(得分:3)

您是否将您的python脚本命名为'wrds.py'?这可以解释为什么python没有找到.sql。

在我的情况下,以下工作:

{
     name: 'Actions',
     displayName: '',
     enableFiltering: false,
     enableColumnMenu: false,
     cellTemplate: ' <div \
    class="ui-grid-cell-contents"> \
    <i \
      ng-class="{ \'ui-grid-icon-right-dir\' : !row.isExpanded, \'ui-grid-icon-down-dir\' : row.isExpanded }" \
      ng-click="grid.api.expandable.toggleRowExpansion(row.entity)"> \
    </i> \
  </div>',
     enableSorting: false
 }