Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
pandas データフレームがあり、すべての列を削除して、インデックスと「bob」という名前の列を保存したいと考えています。
どうすればいいですか?
あなたは簡単に書くことができます:
df = df[['bob']]
他の列はガベージ コレクションされます。