import pandas as pd
a=("Long-term borrowings", "property assets", "short-term borrowings")
b=(1111,3333,5555)
c=(444,7777,899)
d=(345,132,5562)
df=pd.DataFrame(data=(b,c,d),index=a)
print(df)
I just want to extract the value of the row that contains the word borrowing.
pandas dataframe
Please refer to the following.
a=("long-term borrowings", "property assets", "short-term borrowings")
b=(1111,3333,5555)
c=(444,7777,899)
d=(345,132,5562)
df = pd.DataFrame(data=(b,c,d),index=a)
df.loc[df.index.str.contains("borrowing")]
0 1 2
Long-term borrowings 1111 33335555
Short-term borrowings 345 132 5562
549 PHP ssh2_scp_send fails to send files as intended
546 Understanding How to Configure Google API Key
542 Unable to install versioned in Google Colab
537 Uncaught (inpromise) Error on Electron: An object could not be cloned
548 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.