Buggy python submission (verdict: Runtime Error):
import pandas as pd

H,W,K = list(map(int, input().split()))
t=[]
for i in range(H):
    t.append([int(i) for i in input().replace(".","0").replace("#","1")])

cnt = 0
for i in range(2**H):
    for j in range(2**W):
        d = pd.DataFrame(t)
        i_2 = [int(k) for k in bin(i)[2:].rjust(H,"0")]
        j_2 = [ int(k) for k in bin(j)[2:].rjust(W,"0")]
        #print(i_2)
        #print(j_2)
        
        for h in range(H):
            d.iloc[h,:] = d.iloc[h,:] * i_2[h]
        for w in range(W):
            d.iloc[:,w] = d.iloc[:,w] * j_2[w]
        num = sum((d == 1).sum())
        #print(num)
        #print(d)
        if num == K:
            cnt +=1
            
print(cnt)

Fixed submission:
import numpy as np

H,W,K = list(map(int, input().split()))
t=[]
for i in range(H):
    t.append([int(i) for i in input().replace(".","0").replace("#","1")])

cnt = 0
for i in range(2**H):
    for j in range(2**W):
        d = np.array(t)
        i_2 = [int(k) for k in bin(i)[2:].rjust(H,"0")]
        j_2 = [ int(k) for k in bin(j)[2:].rjust(W,"0")]
        #print(i_2)
        #print(j_2)
        
        d= ((d.T)*i_2).T
        d= d*j_2
        
        num = d.sum()
        if num == K:
            cnt +=1
            
print(cnt)

Buggy python submission (verdict: Runtime Error):
import pandas as pd

H,W,K = list(map(int, input().split()))
t=[]
for i in range(H):
    t.append([int(i) for i in input().replace(".","0").replace("#","1")])

cnt = 0
for i in range(2**H):
    for j in range(2**W):
        d = pd.DataFrame(t)
        i_2 = [int(k) for k in bin(i)[2:].rjust(H,"0")]
        j_2 = [ int(k) for k in bin(j)[2:].rjust(W,"0")]
        #print(i_2)
        #print(j_2)
        
        for h in range(H):
            d.iloc[h,:] = d.iloc[h,:] * i_2[h]
        for w in range(W):
            d.iloc[:,w] = d.iloc[:,w] * j_2[w]
        num = sum((d == 1).sum())
        #print(num)
        #print(d)
        if num == K:
            cnt +=1
            
print(cnt)

Fixed submission:
import numpy as np

H,W,K = list(map(int, input().split()))
t=[]
for i in range(H):
    t.append([int(i) for i in input().replace(".","0").replace("#","1")])

cnt = 0
for i in range(2**H):
    for j in range(2**W):
        d = np.array(t)
        i_2 = [int(k) for k in bin(i)[2:].rjust(H,"0")]
        j_2 = [ int(k) for k in bin(j)[2:].rjust(W,"0")]
        #print(i_2)
        #print(j_2)
        
        d= ((d.T)*i_2).T
        d= d*j_2
        
        num = d.sum()
        if num == K:
            cnt +=1
            
print(cnt)

Buggy python submission (verdict: Runtime Error):
import pandas as pd

H,W,K = list(map(int, input().split()))
t=[]
for i in range(H):
    t.append([int(i) for i in input().replace(".","0").replace("#","1")])

cnt = 0
for i in range(2**H):
    for j in range(2**W):
        d = pd.DataFrame(t)
        i_2 = [int(k) for k in bin(i)[2:].rjust(H,"0")]
        j_2 = [ int(k) for k in bin(j)[2:].rjust(W,"0")]
        #print(i_2)
        #print(j_2)
        
        for h in range(H):
            d.iloc[h,:] = d.iloc[h,:] * i_2[h]
        for w in range(W):
            d.iloc[:,w] = d.iloc[:,w] * j_2[w]
        num = sum((d == 1).sum())
        #print(num)
        #print(d)
        if num == K:
            cnt +=1

Fixed submission:
import numpy as np

H,W,K = list(map(int, input().split()))
t=[]
for i in range(H):
    t.append([int(i) for i in input().replace(".","0").replace("#","1")])

cnt = 0
for i in range(2**H):
    for j in range(2**W):
        d = np.array(t)
        i_2 = [int(k) for k in bin(i)[2:].rjust(H,"0")]
        j_2 = [ int(k) for k in bin(j)[2:].rjust(W,"0")]
        #print(i_2)
        #print(j_2)
        
        d= ((d.T)*i_2).T
        d= d*j_2
        
        num = d.sum()
        if num == K:
            cnt +=1
            
print(cnt)