我正在上在線課程,并且試圖使捕獲個(gè)人筆記的課程結(jié)構(gòu)的過(guò)程自動(dòng)化,并將其保存在Markdown文件中。這是一個(gè)示例章節(jié):以下是HTML外觀的示例: <!-- Header of the chapter --> <div class="chapter__header"> <div class="chapter__title-wrapper"> <span class="chapter__number"> <span class="chapter-number">1</span> </span> <h4 class="chapter__title"> Introduction to Experimental Design </h4> <span class="chapter__price"> Free </span> </div> <div class="dc-progress-bar dc-progress-bar--small chapter__progress"> <span class="dc-progress-bar__text">0%</span> <div class="dc-progress-bar__bar chapter__progress-bar"> <span class="dc-progress-bar__fill" style="width: 0%;"></span> </div> </div> </div> <p class="chapter__description"> An introduction to key parts of experimental design plus some power and sample size calculations. </p> <!-- !Header of the chapter --><!-- Body of the chapter --> <ul class="chapter__exercises hidden"> <li class="chapter__exercise "> <a class="chapter__exercise-link" href="https://campus.datacamp.com/courses/experimental-design-in-r/introduction-to-experimental-design?ex=1"> <span class="chapter__exercise-icon exercise-icon "> <img width="23" height="23" src="https://cdn.datacamp.com/main-app/assets/courses/icon_exercise_video-3b15ea50771db747f7add5f53e535066f57d9f94b4b0ebf1e4ddca0347191bb8.svg" alt="Icon exercise video" /> </span> <h5 class="chapter__exercise-title" title='Intro to Experimental Design'>Intro to Experimental Design</h5> <span class="chapter__exercise-xp"> 50 xp </span></a> </li>我的問(wèn)題是:構(gòu)造此數(shù)據(jù)的最佳方法是什么,以便以后在編寫文本文件時(shí)可以輕松訪問(wèn)它?它會(huì)更好,以與列的數(shù)據(jù)幀chapter,lesson,lesson_link?一個(gè)具有MultiIndex的DataFrame?嵌套字典?如果是字典,我應(yīng)該給鍵命名什么?還是我錯(cuò)過(guò)了另一種選擇?某種數(shù)據(jù)庫(kù)?
添加回答
舉報(bào)
0/150
提交
取消