File tree 1 file changed +24
-7
lines changed
1 file changed +24
-7
lines changed Original file line number Diff line number Diff line change 17
17
{
18
18
"cell_type" : " code" ,
19
19
"execution_count" : 1 ,
20
- "metadata" : {},
20
+ "metadata" : {
21
+ "collapsed" : true
22
+ },
21
23
"outputs" : [],
22
24
"source" : [
23
25
" %load_ext autoreload\n " ,
161
163
{
162
164
"cell_type" : " code" ,
163
165
"execution_count" : 5 ,
164
- "metadata" : {},
166
+ "metadata" : {
167
+ "collapsed" : true
168
+ },
165
169
"outputs" : [],
166
170
"source" : [
167
171
" def tokenize_docstring(text):\n " ,
471
475
{
472
476
"cell_type" : " code" ,
473
477
"execution_count" : 13 ,
474
- "metadata" : {},
478
+ "metadata" : {
479
+ "collapsed" : true
480
+ },
475
481
"outputs" : [],
476
482
"source" : [
477
483
" def listlen(x):\n " ,
497
503
{
498
504
"cell_type" : " code" ,
499
505
"execution_count" : 14 ,
500
- "metadata" : {},
506
+ "metadata" : {
507
+ "collapsed" : true
508
+ },
501
509
"outputs" : [],
502
510
"source" : [
503
511
" grouped = with_docstrings.groupby('nwo')"
526
534
{
527
535
"cell_type" : " code" ,
528
536
"execution_count" : 16 ,
529
- "metadata" : {},
537
+ "metadata" : {
538
+ "collapsed" : true
539
+ },
530
540
"outputs" : [],
531
541
"source" : [
532
542
" train = pd.concat([d for _, d in train]).reset_index(drop=True)\n " ,
719
729
{
720
730
"cell_type" : " code" ,
721
731
"execution_count" : 39 ,
722
- "metadata" : {},
732
+ "metadata" : {
733
+ "collapsed" : true
734
+ },
723
735
"outputs" : [],
724
736
"source" : [
725
737
" def write_to(df, filename, path='./data/processed_data/'):\n " ,
736
748
{
737
749
"cell_type" : " code" ,
738
750
"execution_count" : 40 ,
739
- "metadata" : {},
751
+ "metadata" : {
752
+ "collapsed" : true
753
+ },
740
754
"outputs" : [],
741
755
"source" : [
756
+ " import os\n " ,
757
+ " if not os.path.exists('data/'):\n " ,
758
+ " os.makedirs('data/')\n " ,
742
759
" # write to output files\n " ,
743
760
" write_to(train, 'train')\n " ,
744
761
" write_to(valid, 'valid')\n " ,
You can’t perform that action at this time.
0 commit comments