रीसेट किए बिना इंडेक्स में कॉलम जोड़ें, मैं इसे पहले रीसेट किए बिना नीचे दिए गए इंडेक्स में 'd'
कैसे जोड़ूं?पांडस डेटाफ्रेम
from pandas import DataFrame
df = DataFrame({'a': range(6), 'b': range(6), 'c': range(6)})
df.set_index(['a','b'], inplace=True)
df['d'] = range(6)
# how do I set index to 'a b d' without having to reset it first?
df.reset_index(['a','b','d'], inplace=True)
df.set_index(['a','b','d'], inplace=True)
df