| A_c | A_e | A_t | B_c | B_e | B_t | C_c | C_e | C_t | D_c | D_e | D_t | Key_c | Key_e | Key_t | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | False | 1 | nan | False | A | nan | False | 1 | nan | False | J | nan | False | 1 | nan |
| 1 | True | 1 | 1 | False | A | B | True | 2 | 2 | False | J | N | True | 2 | 2 |
| 2 | True | 1 | 1 | True | A | A | True | 3 | 3 | True | J | J | True | 3 | 3 |
| 3 | False | 1 | 2 | True | A | A | False | 4 | 6 | True | J | J | True | 4 | 4 |
| 4 | True | 1 | 1 | True | A | A | True | 5 | 5 | True | J | J | True | 5 | 5 |
| 5 | False | nan | 1 | False | nan | A | False | nan | 1 | False | nan |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass{article} | |
| \usepackage[T1]{fontenc} | |
| \usepackage{graphicx} | |
| \usepackage{csquotes} | |
| \usepackage{xcolor} | |
| \usepackage{tikz} | |
| \usetikzlibrary{positioning} | |
| \usetikzlibrary{calc} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass{article} | |
| \usepackage[T1]{fontenc} | |
| \usepackage{graphicx} | |
| \usepackage{csquotes} | |
| \usepackage{xcolor} | |
| \usepackage{tikz} | |
| \begin{document} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass[21pt]{scrartcl} | |
| \usepackage[left=2cm,right=2cm, top=2cm,bottom=2cm,a3paper]{geometry} | |
| \usepackage{forloop} | |
| \setlength{\parindent}{0pt} | |
| \usepackage{tikz} | |
| \newcounter{ct} | |
| \usepackage{pgfpages} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import collections | |
| import pandas as pd | |
| file1 = pd.read_csv('file1.csv', sep=';', encoding='UTF-8') | |
| file2 = pd.read_csv('file2.csv', sep=';', encoding='UTF-8') | |
| columnnames1 = list(file1) | |
| columnnames2 = list(file2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # names of the comparison column | |
| check_colnames= [s + '_c' for s in columnnames1] | |
| # initialize an empty dataframe for the log | |
| logdf=pd.DataFrame(index=[True,False]) | |
| for column in check_colnames: | |
| t=comparison[column].value_counts() # returns a series | |
| tt=pd.DataFrame(t) # makes a DF out of the series | |
| logdf = logdf.join(tt,how='outer') # join the two dfs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # column names for the comparison column | |
| check_colnames= [s + '_c' for s in columnnames1] | |
| # add suffixes to distinguish between actual and expected in the merger | |
| file1 = file1.add_suffix('_e') # expected | |
| file2 = file2.add_suffix('_t') # actual, true result | |
| # merge them using the given key, use outer join | |
| comparison = pd.merge(file1,file2, how='outer', | |
| left_on=['Key_e'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # load both files into separate dataframes | |
| file1 = pd.read_csv('file1.csv', sep=';', encoding='UTF-8') | |
| file2 = pd.read_csv('file2.csv', sep=';', encoding='UTF-8') | |
| # save the list of column names for each dataset | |
| columnnames1 = list(file1) | |
| columnnames2 = list(file2) | |
| # check if the columns match | |
| if collections.Counter(columnnames1) == collections.Counter(columnnames2): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import collections | |
| import pandas as pd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| Created 20200215 | |
| @author: Uwe Ziegenhagen, ziegenhagen@gmail.com | |
| Initial version, needs heavy refactoring | |
| See https://github.com/jemmyw/Qif/blob/master/QIF_references for info | |
| """ |
NewerOlder