这是一个简单的。
我有这个df:
<!-- Cancel Modal -->
<div class="modal fade" id="cancelModal"
tabindex="-1" role="dialog" aria-labelledby="cancelModal"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="cancelModalLabel">Cancel Warning</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Are you sure you want to cancel the form?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-
dismiss="modal">Close</button>
<button type="button" class="btn btn-primary"
(click)="cancel()">Yes</button>
</div>
</div>
</div>
</div>
<!-- Submit Modal -->
<div class="modal fade" id="submitModal" tabindex="-1"
role="dialog" aria-labelledby="submitModal" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="submitModalLabel">Submit Warning</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Are you sure you want to submit and close the form?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" routerLink="/submission"
(click)="submitForm()">Yes</button>
</div>
</div>
</div>
</div>
我需要像这样将其转换为df:
> str(df)
chr [1:16] "article" "198" "masterThesis" "181" "doctoralThesis" "70"
像这样的df有任何简单的单线通用解决方案吗?