File size: 27,670 Bytes
9df4cc0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "sys.path.append(\"../../FinNLP\")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### SEC"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from finnlp.data_sources.company_announcement.sec import SEC_Announcement"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "start_date = \"2020-01-01\"\n",
    "end_date = \"2020-06-01\"\n",
    "stock = \"AAPL\"\n",
    "config = {\n",
    "    \"use_proxy\": \"us_free\",\n",
    "    \"max_retry\": 5,\n",
    "    \"proxy_pages\": 3,\n",
    "}\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Checking ips: 100%|██████████| 45/45 [01:42<00:00,  2.28s/it]\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Get proxy ips: 45.\n",
      "Usable proxy ips: 44.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Downloading by item...: 100%|██████████| 39/39 [01:39<00:00,  2.54s/it]\n"
     ]
    }
   ],
   "source": [
    "downloader = SEC_Announcement(config)\n",
    "downloader.download_date_range_stock(start_date, end_date, stock = stock)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>_id</th>\n",
       "      <th>ciks</th>\n",
       "      <th>period_ending</th>\n",
       "      <th>root_form</th>\n",
       "      <th>file_num</th>\n",
       "      <th>display_names</th>\n",
       "      <th>xsl</th>\n",
       "      <th>sequence</th>\n",
       "      <th>file_date</th>\n",
       "      <th>biz_states</th>\n",
       "      <th>sics</th>\n",
       "      <th>form</th>\n",
       "      <th>adsh</th>\n",
       "      <th>film_num</th>\n",
       "      <th>biz_locations</th>\n",
       "      <th>file_type</th>\n",
       "      <th>file_description</th>\n",
       "      <th>inc_states</th>\n",
       "      <th>ite</th>\n",
       "      <th>content</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0000320193-20-000056:wf-form4_158932261319105.xml</td>\n",
       "      <td>[0001631982, 0000320193]</td>\n",
       "      <td>2020-05-08</td>\n",
       "      <td>4</td>\n",
       "      <td>[]</td>\n",
       "      <td>[KONDO CHRIS  (CIK 0001631982), Apple Inc.  (A...</td>\n",
       "      <td>xslF345X03</td>\n",
       "      <td>1</td>\n",
       "      <td>2020-05-12</td>\n",
       "      <td>[]</td>\n",
       "      <td>[3571]</td>\n",
       "      <td>4</td>\n",
       "      <td>0000320193-20-000056</td>\n",
       "      <td>[]</td>\n",
       "      <td>[, ]</td>\n",
       "      <td>4</td>\n",
       "      <td>FORM 4</td>\n",
       "      <td>[, CA, ]</td>\n",
       "      <td>[]</td>\n",
       "      <td>SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0000320193-20-000054:wf-form4_158829658358801.xml</td>\n",
       "      <td>[0001051401, 0000320193]</td>\n",
       "      <td>2020-04-28</td>\n",
       "      <td>4</td>\n",
       "      <td>[001-36743]</td>\n",
       "      <td>[JUNG ANDREA  (CIK 0001051401), Apple Inc.  (A...</td>\n",
       "      <td>xslF345X03</td>\n",
       "      <td>1</td>\n",
       "      <td>2020-04-30</td>\n",
       "      <td>[CA]</td>\n",
       "      <td>[3571]</td>\n",
       "      <td>4</td>\n",
       "      <td>0000320193-20-000054</td>\n",
       "      <td>[20838087]</td>\n",
       "      <td>[, Cupertino, CA]</td>\n",
       "      <td>4</td>\n",
       "      <td>FORM 4</td>\n",
       "      <td>[, CA]</td>\n",
       "      <td>[]</td>\n",
       "      <td>SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                 _id  \\\n",
       "0  0000320193-20-000056:wf-form4_158932261319105.xml   \n",
       "1  0000320193-20-000054:wf-form4_158829658358801.xml   \n",
       "\n",
       "                       ciks period_ending root_form     file_num  \\\n",
       "0  [0001631982, 0000320193]    2020-05-08         4           []   \n",
       "1  [0001051401, 0000320193]    2020-04-28         4  [001-36743]   \n",
       "\n",
       "                                       display_names         xsl sequence  \\\n",
       "0  [KONDO CHRIS  (CIK 0001631982), Apple Inc.  (A...  xslF345X03        1   \n",
       "1  [JUNG ANDREA  (CIK 0001051401), Apple Inc.  (A...  xslF345X03        1   \n",
       "\n",
       "    file_date biz_states    sics form                  adsh    film_num  \\\n",
       "0  2020-05-12         []  [3571]    4  0000320193-20-000056          []   \n",
       "1  2020-04-30       [CA]  [3571]    4  0000320193-20-000054  [20838087]   \n",
       "\n",
       "       biz_locations file_type file_description inc_states ite  \\\n",
       "0               [, ]         4           FORM 4   [, CA, ]  []   \n",
       "1  [, Cupertino, CA]         4           FORM 4     [, CA]  []   \n",
       "\n",
       "                                             content  \n",
       "0  SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...  \n",
       "1  SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...  "
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = downloader.dataframe\n",
    "# df = df.drop_duplicates()\n",
    "df.head(2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(21, 20)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>file_date</th>\n",
       "      <th>display_names</th>\n",
       "      <th>content</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2020-05-12</td>\n",
       "      <td>[KONDO CHRIS  (CIK 0001631982), Apple Inc.  (A...</td>\n",
       "      <td>SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2020-04-30</td>\n",
       "      <td>[JUNG ANDREA  (CIK 0001051401), Apple Inc.  (A...</td>\n",
       "      <td>SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2020-04-17</td>\n",
       "      <td>[O'BRIEN DEIRDRE  (CIK 0001767094), Apple Inc....</td>\n",
       "      <td>SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2020-04-17</td>\n",
       "      <td>[KONDO CHRIS  (CIK 0001631982), Apple Inc.  (A...</td>\n",
       "      <td>SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2020-04-09</td>\n",
       "      <td>[Maestri Luca  (CIK 0001513362), Apple Inc.  (...</td>\n",
       "      <td>SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2020-04-03</td>\n",
       "      <td>[WILLIAMS JEFFREY E  (CIK 0001496686), Apple I...</td>\n",
       "      <td>SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2020-04-03</td>\n",
       "      <td>[Maestri Luca  (CIK 0001513362), Apple Inc.  (...</td>\n",
       "      <td>SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2020-02-28</td>\n",
       "      <td>[WAGNER SUSAN  (CIK 0001059235), Apple Inc.  (...</td>\n",
       "      <td>SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2020-02-28</td>\n",
       "      <td>[LEVINSON ARTHUR D  (CIK 0001214128), Apple In...</td>\n",
       "      <td>SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2020-02-28</td>\n",
       "      <td>[JUNG ANDREA  (CIK 0001051401), Apple Inc.  (A...</td>\n",
       "      <td>SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    file_date                                      display_names  \\\n",
       "0  2020-05-12  [KONDO CHRIS  (CIK 0001631982), Apple Inc.  (A...   \n",
       "1  2020-04-30  [JUNG ANDREA  (CIK 0001051401), Apple Inc.  (A...   \n",
       "2  2020-04-17  [O'BRIEN DEIRDRE  (CIK 0001767094), Apple Inc....   \n",
       "3  2020-04-17  [KONDO CHRIS  (CIK 0001631982), Apple Inc.  (A...   \n",
       "4  2020-04-09  [Maestri Luca  (CIK 0001513362), Apple Inc.  (...   \n",
       "5  2020-04-03  [WILLIAMS JEFFREY E  (CIK 0001496686), Apple I...   \n",
       "6  2020-04-03  [Maestri Luca  (CIK 0001513362), Apple Inc.  (...   \n",
       "7  2020-02-28  [WAGNER SUSAN  (CIK 0001059235), Apple Inc.  (...   \n",
       "8  2020-02-28  [LEVINSON ARTHUR D  (CIK 0001214128), Apple In...   \n",
       "9  2020-02-28  [JUNG ANDREA  (CIK 0001051401), Apple Inc.  (A...   \n",
       "\n",
       "                                             content  \n",
       "0  SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...  \n",
       "1  SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...  \n",
       "2  SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...  \n",
       "3  SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...  \n",
       "4  SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...  \n",
       "5  SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...  \n",
       "6  SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...  \n",
       "7  SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...  \n",
       "8  SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...  \n",
       "9  SEC Form 4 \\n   FORM 4UNITED STATES SECURITIES...  "
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "selected_columns = [\"file_date\", \"display_names\", \"content\"]\n",
    "df[selected_columns].head(10)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Juchao"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "from finnlp.data_sources.company_announcement.juchao import Juchao_Announcement"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "start_date = \"2020-01-01\"\n",
    "end_date = \"2020-06-01\"\n",
    "stock = \"000001\"\n",
    "config = {\n",
    "    \"use_proxy\": \"china_free\",\n",
    "    \"max_retry\": 5,\n",
    "    \"proxy_pages\": 3,\n",
    "}\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Gathering free ips by pages...: 100%|██████████| 3/3 [00:05<00:00,  1.86s/it]\n",
      "Checking ips: 100%|██████████| 45/45 [00:48<00:00,  1.09s/it]\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "获取到的代理ip数量: 45 。Get proxy ips: 45.\n",
      "能用的代理数量: 6。Usable proxy ips: 6.\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "1bb13261e75147929b30222347ab9cc5",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Downloading by page...:   0%|          | 0/2 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "011ea7c465ad4e1aaccf09714b8e3e19",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Getting the text data...:   0%|          | 0/42 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "downloader = Juchao_Announcement(config)\n",
    "downloader.download_date_range_stock(start_date, end_date, stock = stock, get_content = True, delate_pdf = True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>secCode</th>\n",
       "      <th>secName</th>\n",
       "      <th>orgId</th>\n",
       "      <th>announcementId</th>\n",
       "      <th>announcementTitle</th>\n",
       "      <th>announcementTime</th>\n",
       "      <th>adjunctUrl</th>\n",
       "      <th>adjunctSize</th>\n",
       "      <th>adjunctType</th>\n",
       "      <th>...</th>\n",
       "      <th>important</th>\n",
       "      <th>batchNum</th>\n",
       "      <th>announcementContent</th>\n",
       "      <th>orgName</th>\n",
       "      <th>tileSecName</th>\n",
       "      <th>shortTitle</th>\n",
       "      <th>announcementTypeName</th>\n",
       "      <th>secNameList</th>\n",
       "      <th>PDF_path</th>\n",
       "      <th>Content</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>None</td>\n",
       "      <td>000001</td>\n",
       "      <td>平安银行</td>\n",
       "      <td>gssz0000001</td>\n",
       "      <td>1207862647</td>\n",
       "      <td>关于2020年第一期小型微型企业贷款专项金融债券发行完毕的公告</td>\n",
       "      <td>2020-05-27</td>\n",
       "      <td>finalpage/2020-05-27/1207862647.PDF</td>\n",
       "      <td>148</td>\n",
       "      <td>PDF</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td></td>\n",
       "      <td>None</td>\n",
       "      <td>平安银行</td>\n",
       "      <td>关于2020年第一期小型微型企业贷款专项金融债券发行完毕的公告</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>removed</td>\n",
       "      <td>证券代码: 000001               证券简称:平安银行          ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>None</td>\n",
       "      <td>000001</td>\n",
       "      <td>平安银行</td>\n",
       "      <td>gssz0000001</td>\n",
       "      <td>1207843688</td>\n",
       "      <td>2019年年度权益分派实施公告</td>\n",
       "      <td>2020-05-22</td>\n",
       "      <td>finalpage/2020-05-22/1207843688.PDF</td>\n",
       "      <td>214</td>\n",
       "      <td>PDF</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td></td>\n",
       "      <td>None</td>\n",
       "      <td>平安银行</td>\n",
       "      <td>2019年年度权益分派实施公告</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>removed</td>\n",
       "      <td>1  证券代码: 000001               证券简称:平安银行       ...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>2 rows × 25 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     id secCode secName        orgId announcementId  \\\n",
       "0  None  000001    平安银行  gssz0000001     1207862647   \n",
       "1  None  000001    平安银行  gssz0000001     1207843688   \n",
       "\n",
       "                 announcementTitle announcementTime  \\\n",
       "0  关于2020年第一期小型微型企业贷款专项金融债券发行完毕的公告       2020-05-27   \n",
       "1                  2019年年度权益分派实施公告       2020-05-22   \n",
       "\n",
       "                            adjunctUrl  adjunctSize adjunctType  ...  \\\n",
       "0  finalpage/2020-05-27/1207862647.PDF          148         PDF  ...   \n",
       "1  finalpage/2020-05-22/1207843688.PDF          214         PDF  ...   \n",
       "\n",
       "  important batchNum announcementContent orgName tileSecName  \\\n",
       "0      None     None                        None        平安银行   \n",
       "1      None     None                        None        平安银行   \n",
       "\n",
       "                        shortTitle announcementTypeName secNameList PDF_path  \\\n",
       "0  关于2020年第一期小型微型企业贷款专项金融债券发行完毕的公告                 None        None  removed   \n",
       "1                  2019年年度权益分派实施公告                 None        None  removed   \n",
       "\n",
       "                                             Content  \n",
       "0  证券代码: 000001               证券简称:平安银行          ...  \n",
       "1  1  证券代码: 000001               证券简称:平安银行       ...  \n",
       "\n",
       "[2 rows x 25 columns]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = downloader.dataframe\n",
    "df.head(2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(42, 25)"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>announcementTime</th>\n",
       "      <th>shortTitle</th>\n",
       "      <th>Content</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2020-05-27</td>\n",
       "      <td>关于2020年第一期小型微型企业贷款专项金融债券发行完毕的公告</td>\n",
       "      <td>证券代码: 000001               证券简称:平安银行          ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2020-05-22</td>\n",
       "      <td>2019年年度权益分派实施公告</td>\n",
       "      <td>1  证券代码: 000001               证券简称:平安银行       ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2020-05-20</td>\n",
       "      <td>关于获准发行小微企业贷款专项金融债券的公告</td>\n",
       "      <td>证券代码: 000001             证券简称:平安银行            ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2020-05-16</td>\n",
       "      <td>监事会决议公告</td>\n",
       "      <td>1  证券代码: 000001                证券简称: 平安银行     ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2020-05-15</td>\n",
       "      <td>2019年年度股东大会决议公告</td>\n",
       "      <td>1  证券代码: 000001               证券简称:平安银行       ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2020-05-15</td>\n",
       "      <td>2019年年度股东大会的法律意见书</td>\n",
       "      <td>北京总部   电话 : (86 -10) 8519 -1300  传真 : (86 -10...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2020-04-30</td>\n",
       "      <td>中信证券股份有限公司、平安证券股份有限公司关于公司关联交易有关事项的核查意见</td>\n",
       "      <td>1 中信证券股份有限公司 、平安证券股份有限 公司 关于平安银行股份有限公司  关联交易 有...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2020-04-30</td>\n",
       "      <td>独立董事独立意见</td>\n",
       "      <td>1   平安银行股份有限公司独立董事独立意见   根据《关于在上市公司建立独立董事制度的指导...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2020-04-30</td>\n",
       "      <td>关联交易公告</td>\n",
       "      <td>1  证券代码: 000001               证券简称:平安银行       ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2020-04-21</td>\n",
       "      <td>2020年第一季度报告全文</td>\n",
       "      <td>证券代码: 000001            证券简称:平安银行             ...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  announcementTime                              shortTitle  \\\n",
       "0       2020-05-27         关于2020年第一期小型微型企业贷款专项金融债券发行完毕的公告   \n",
       "1       2020-05-22                         2019年年度权益分派实施公告   \n",
       "2       2020-05-20                   关于获准发行小微企业贷款专项金融债券的公告   \n",
       "3       2020-05-16                                 监事会决议公告   \n",
       "4       2020-05-15                         2019年年度股东大会决议公告   \n",
       "5       2020-05-15                       2019年年度股东大会的法律意见书   \n",
       "6       2020-04-30  中信证券股份有限公司、平安证券股份有限公司关于公司关联交易有关事项的核查意见   \n",
       "7       2020-04-30                                独立董事独立意见   \n",
       "8       2020-04-30                                  关联交易公告   \n",
       "9       2020-04-21                           2020年第一季度报告全文   \n",
       "\n",
       "                                             Content  \n",
       "0  证券代码: 000001               证券简称:平安银行          ...  \n",
       "1  1  证券代码: 000001               证券简称:平安银行       ...  \n",
       "2  证券代码: 000001             证券简称:平安银行            ...  \n",
       "3  1  证券代码: 000001                证券简称: 平安银行     ...  \n",
       "4  1  证券代码: 000001               证券简称:平安银行       ...  \n",
       "5   北京总部   电话 : (86 -10) 8519 -1300  传真 : (86 -10...  \n",
       "6  1 中信证券股份有限公司 、平安证券股份有限 公司 关于平安银行股份有限公司  关联交易 有...  \n",
       "7  1   平安银行股份有限公司独立董事独立意见   根据《关于在上市公司建立独立董事制度的指导...  \n",
       "8  1  证券代码: 000001               证券简称:平安银行       ...  \n",
       "9  证券代码: 000001            证券简称:平安银行             ...  "
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "selected_columns = [\"announcementTime\", \"shortTitle\",\"Content\"]\n",
    "df[selected_columns].head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "finrl",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.12"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "afd6dc03c9be451573fc2885de79a969af6a24a159f11a3ead741ab7a9ff405f"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}