pandas Flashcards
read from trash
df=pd.read_clipboard()
no aparezcan los titulos de las tablas
df1=pd.read_excel(ruta,header=None)
drop COLUMN
df.drop([“column 1”,”column 2”],axis=1)
drop ROW
df.drop(0)
df.drop ([1,20]) # delete only a row // you cant delete more
iloc
df.iloc[0] // df.iloc[[0]]
df.iloc[0:10]
df.iloc[0:3,0:2]
delete index
b.reset_index(drop=True) //
concatenar tablas
pd.concat([table1,table2,table3])
pd.concat([table1,table2,table3],ignore_index=True) # ignore index
save document
name_table.to_excel(“new route.xlsx”)
name_table.to_excel(“new route.xlsx”, index=False) # ignore index
open document
import xlwings as sw
sw.Book(“book.xlsx”)
python built in functions
# pd.pivot_table()
# dt=xw.view(“sadfsadjfl.xlsx”)
#grafico=td.plot(kind=”bar”)