![](/img/trans.png)
[英]Pandas: How to get the sample rows from each category from specific column in dataframe and save in single csv?
[英]How to save a pandas dataframe into a string that i can save and retrieve from a single column in sql database?
我有一個名為df
的數據df
,我想將其保存在數據庫的單列中,這樣我就可以將其檢索為數據框格式並在我的函數中使用。
我發現了df.to_string和df._to_sql之類的函數。 我可以將其另存為字符串,但是無法將數據取回數據框。
知道我該怎么做嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.