:
df.loc[‘image1’:‘image10’, ‘age’:‘score’]
实例:
import numpy as np
import pandas as pd
from pandas...import Series, DataFrame
np.random.seed(666)
df = pd.DataFrame(np.random.rand(25).reshape([5, 5]), index...=['A', 'B', 'D', 'E', 'F'], columns=['c1', 'c2', 'c3', 'c4', 'c5'])
print(df.shape) # (5, 5)
# 返回前五行...0.099929 D 0.200248 0.700845 E 0.774479 0.110954 F 0.023236 0.197503 '''
# 赋值于一个新的 dataframe
sub_df...如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。