Skip to content

Instantly share code, notes, and snippets.

View masiarek's full-sized avatar

Adam Masiarek masiarek

View GitHub Profile
import pandas as pd
from io import StringIO
import io
A = """
k1,k2,a3
1,44,x
2,55,y
3,66,z"""
import pandas as pd
import io, csv
A = """
k1,k2,a3
1,44,x
2,55,y
3,66,z"""
B = """
from collections import defaultdict
from pprint import pp
left = [{1: ["10", "11"]}, {2: ["20", "21"]}]
right = [
{"10": ["a", "b"]},
{"11": ["a", "b"]},
{"20": ["x", "y"]},
{"21": ["x", "z"]}, # <== here is a difference!
]
import csv
from collections import defaultdict
dd = defaultdict(list)
with open("BKPF.txt") as bkpf:
dd = csv.DictReader(bkpf)
print(*dd.fieldnames, sep="|")
for e in dd:
print(*e.values())
import pytest
@pytest.fixture(autouse=True, scope="module")
def fix_module():
print("\nFix module setup")
yield
print("\nFix module teardown")
### Keybase proof
I hereby claim:
* I am masiarek on github.
* I am a_masiarek (https://keybase.io/a_masiarek) on keybase.
* I have a public key ASAptImDJxWgKF_h6FAwW5jg7pnu6lmMbV36IsXEW3X4BAo
To claim this, I am signing this object: