擅长:python、mysql、java
<p>test.json的有效json格式</p>
<pre><code>[{"Item":{"title":{"S":"https://medium.com/media/d40eb665beb374c0baaacb3b5a86534c/href"}}},
{"Item":{"title":{"S":"https://fasttext.cc/docs/en/autotune.html"}}},
{"Item":{"title":{"S":"https://nlp.stanford.edu/~socherr/EMNLP2013_RNTN.pdf"}}},
{"Item":{"title":{"S":"https://github.com/avinashbarnwal/GSOC-2019/tree/master/AFT/test/data/neuroblastoma-data-master/data/H3K27ac-H3K4me3_TDHAM_BP"}}}]
</code></pre>
<p>使用此代码:</p>
<pre><code>df = pd.read_json("test.json")
df['url'] = df['Item'].apply(lambda x: x.get('title').get('S'))
print(df['url'])
</code></pre>
<p>输出:</p>
<pre><code>0 https://medium.com/media/d40eb665beb374c0baaac...
1 https://fasttext.cc/docs/en/autotune.html
2 https://nlp.stanford.edu/~socherr/EMNLP2013_RN...
3 https://github.com/avinashbarnwal/GSOC-2019/tr...
</code></pre>