{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "2b46ea32-3e2e-466b-ac6a-9874336551af", "metadata": {}, "outputs": [], "source": [ "import dolphindb as ddb\n", "\n", "sess = ddb.session('localhost', 8848)\n", "sess.login('admin', '123456')" ] }, { "cell_type": "code", "execution_count": 6, "id": "6cc64a77-a5ad-46b6-8204-b188ee308ad3", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'partitionType': 5,\n", " 'partitionColumnType': 17,\n", " 'partitionColumnIndex': 0,\n", " 'chunkPath': None,\n", " 'colDefs': name typeString typeInt comment\n", " 0 code SYMBOL 17 \n", " 1 report_period DATE 6 \n", " 2 appear_at_date DATE 6 \n", " 3 S_PROFITNOTICE_STYLE STRING 18 \n", " 4 S_PROFITNOTICE_CHANGEMIN DOUBLE 16 \n", " 5 S_PROFITNOTICE_CHANGEMAX DOUBLE 16 \n", " 6 S_PROFITNOTICE_NETPROFITMIN DOUBLE 16 \n", " 7 S_PROFITNOTICE_NETPROFITMAX DOUBLE 16 \n", " 8 S_PROFITNOTICE_REASON STRING 18 ,\n", " 'chunkGranularity': 'TABLE',\n", " 'partitionTypeName': 'HASH',\n", " 'keepDuplicates': 'ALL',\n", " 'engineType': 'TSDB',\n", " 'partitionColumnName': 'code',\n", " 'partitionSchema': 50,\n", " 'sortColumns': array(['code', 'report_period', 'appear_at_date'], dtype=object),\n", " 'partitionSites': None}" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sess.run(\"tbl_ep = loadTable('dfs://pit_stock_ts', 'earnings_preannouncement')\")\n", "sess.run(\"schema(tbl_ep)\")" ] }, { "cell_type": "code", "execution_count": 10, "id": "39c05247-deac-4c49-a20d-e19e637c6081", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | code | \n", "report_period | \n", "cnt | \n", "
---|---|---|---|
0 | \n", "600543.SH | \n", "2021-12-31 | \n", "3 | \n", "
1 | \n", "605499.SH | \n", "2021-06-30 | \n", "3 | \n", "
2 | \n", "603729.SH | \n", "2020-12-31 | \n", "3 | \n", "
3 | \n", "002058.SZ | \n", "2020-12-31 | \n", "3 | \n", "
4 | \n", "601599.SH | \n", "2020-12-31 | \n", "3 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "
295 | \n", "600813.SH | \n", "2002-06-30 | \n", "4 | \n", "
296 | \n", "000689.SZ | \n", "2002-06-30 | \n", "5 | \n", "
297 | \n", "000653.SZ | \n", "2002-06-30 | \n", "4 | \n", "
298 | \n", "000658.SZ | \n", "2002-06-30 | \n", "7 | \n", "
299 | \n", "600853.SH | \n", "2001-12-31 | \n", "3 | \n", "
300 rows × 3 columns
\n", "\n", " | code | \n", "report_period | \n", "appear_at_date | \n", "S_PROFITNOTICE_STYLE | \n", "S_PROFITNOTICE_CHANGEMIN | \n", "S_PROFITNOTICE_CHANGEMAX | \n", "S_PROFITNOTICE_NETPROFITMIN | \n", "S_PROFITNOTICE_NETPROFITMAX | \n", "S_PROFITNOTICE_REASON | \n", "
---|---|---|---|---|---|---|---|---|---|
0 | \n", "600543.SH | \n", "2021-12-31 | \n", "2021-10-30 | \n", "预亏 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "1-9月,公司累计营业收入增长39.61%,但较2019年同期仍有明显下滑,目前处于亏损状态... | \n", "
1 | \n", "600543.SH | \n", "2021-12-31 | \n", "2022-01-29 | \n", "预亏 | \n", "-4939.0 | \n", "-4939.0 | \n", "-9000.0 | \n", "-9000.0 | \n", "1、主营业务影响。受新冠肺炎疫情等因素影响,消费市场低迷,流通环节受限、下游需求收缩,公司葡... | \n", "
2 | \n", "600543.SH | \n", "2021-12-31 | \n", "2022-03-31 | \n", "预亏 | \n", "-5408.0 | \n", "-5408.0 | \n", "-9872.0 | \n", "-9872.0 | \n", "公司财务部门将2021年度计提的固定资产减值准备4830万元,作非经常性损益处理,在审计时,... | \n", "