import pandas as pddic_test=a123 b446c789df=pdDataFramedic testfor i in dfindexprintiend=for i in dfcolumnsprintiend=for i in dfshapeprintiend=输出结果
The code provided has syntax errors and will not run. Here's the corrected code:
import pandas as pd
dic_test = {'a':[1,2,3], 'b':[4,4,6],'c':[7,8,9]}
df = pd.DataFrame(dic_test)
for i in df.index:
print(i, end="")
for i in df.columns:
print(i, end="")
for i in df.shape:
print(i, end="")
The output will be:
012abc321
原文地址: https://www.cveoy.top/t/topic/igA9 著作权归作者所有。请勿转载和采集!