8000 pandas dataframe set_value changed to at · omerfarukeker/Sudoku-Solver@6edb79f · GitHub
[go: up one dir, main page]

Skip to content

Commit 6edb79f

Browse files
author
Ömer Faruk Eker
committed
pandas dataframe set_value changed to at
1 parent 082627e commit 6edb79f

20 files changed

+3
-2
lines changed
1.76 KB
Binary file not shown.
Binary file not shown.
600 Bytes
Binary file not shown.
Binary file not shown.
2.02 KB
Binary file not shown.
1.01 KB
Binary file not shown.
Binary file not shown.
1.62 KB
Binary file not shown.
512 Bytes
Binary file not shown.
769 Bytes
Binary file not shown.
927 Bytes
Binary file not shown.
4.37 KB
Binary file not shown.
1.2 KB
Binary file not shown.
1.44 KB
Binary file not shown.
Binary file not shown.
1.23 KB
Binary file not shown.
2.21 KB
Binary file not shown.
3.71 KB
Binary file not shown.

codes/naked_pairs_triples_quads.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ def naked_remove(rowcolbox,group_no,naked_inxs,comb,cands,square_pos,no_of_naked
124124
# cands.iloc[row,col] = np.array(list(set(comb)&set(cands.iloc[row,col])))
125125
# cands.iloc[row,col] = np.array(list(set(cands.iloc[row,col]).difference(set(comb))))
126126
# cands.loc[row][col] = np.array(list(set(cands.iloc[row,col]).difference(set(comb))))
127-
cands.set_value(row,col,np.array(list(set(cands.iloc[row,col]).difference(set(comb)))))
127+
# cands.set_value(row,col,np.array(list(set(cands.iloc[row,col]).difference(set(comb)))))
128+
cands.at[row,col] = np.array(list(set(cands.iloc[row,col]).difference(set(comb))))
128129
print(f"R{row:<1}C{col:<1} Naked {pairtriplequad[no_of_nakeds]:>7}s ({rowcolbox:<3}), {str(removed_vals):<15} removed, {pairtriplequad[no_of_nakeds]:>7}s: {str(comb):>6}")
129130
ischanged = 1
130131

codes/sudoku_solver.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
# (SOLVED) sudoku book 3 cok zor puzzle 2 pointing pairs
160160
# grid = "400000005060000010002306900008050200000704000007030500003902400020000080600000001"
161161
# (SOLVED) sudoku book 3 imkansiz puzzle 2 pointing pairs, X-wing
162-
# grid = "009004003030070090800900600001008007040010020600400500005002008080030070400700100"
162+
grid = "009004003030070090800900600001008007040010020600400500005002008080030070400700100"
163163

164164
#use following to convert board tables to single line string:
165165
# grid = np.array2string(board.replace(".",0).values.flatten()).translate({ord(i): None for i in "[]\n "})

0 commit comments

Comments
 (0)
0