pandas Flashcards

1
Q

read from trash

A

df=pd.read_clipboard()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

no aparezcan los titulos de las tablas

A

df1=pd.read_excel(ruta,header=None)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

drop COLUMN

A

df.drop([“column 1”,”column 2”],axis=1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

drop ROW

A

df.drop(0)
df.drop ([1,20]) # delete only a row // you cant delete more

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

iloc

A

df.iloc[0] // df.iloc[[0]]
df.iloc[0:10]
df.iloc[0:3,0:2]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

delete index

A

b.reset_index(drop=True) //

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

concatenar tablas

A

pd.concat([table1,table2,table3])
pd.concat([table1,table2,table3],ignore_index=True) # ignore index

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

save document

A

name_table.to_excel(“new route.xlsx”)
name_table.to_excel(“new route.xlsx”, index=False) # ignore index

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

open document

A

import xlwings as sw
sw.Book(“book.xlsx”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

python built in functions
# pd.pivot_table()
# dt=xw.view(“sadfsadjfl.xlsx”)
#grafico=td.plot(kind=”bar”)

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly