Question: So I may have set up Git under an account that I will not be using in the future, and I want to change that account to my personal GitHub account. I would like to push under my personal rather than that one. 

If this has any relevance, I've created a separate SSH key for my computer, but as inexperienced as I am, I'm not sure what to do with it. 

My ultimate goal is to change the GitHub account I'm under, because whenever I try to push code to my personal account's repository, I get this error message:

```
$ git push origin master
remote: Permission to maiusername/SURVIVAL2.git denied to SupernovaRobotics.
fatal: unable to access 'https://github.com/maiusername/SURVIVAL2.git/': The requested URL returned error: 403

```

SupernovaRobotics is what I'm trying to get rid of, but I'm not sure how!

Please help!!

Answer: 
It sounds like the sticking point is how to detect "almost identical" columns, which are columns that only differ (if at all) in what values are missing. Given two column names, how do you check if they are almost identical? Note that if we find a difference that counts, it must be at an index for which neither column has `NaN`. In other words, the trick is to **discard rows with a missing value and compare the rest:**

```
tocheck = df[["B", "D"]].dropna()
if all(tocheck.B == tocheck.D):
    print("B, D are almost identical")

```

Let's use this to iterate over all pairs of columns, and merge the ones that match:

```
for a, b in itertools.combinations(df.columns, 2):
    if a not in df.columns or b not in df.columns:  # Was one deleted already?
        continue
    tocheck = df[[a, b]].dropna()
    if all(tocheck[a] == tocheck[b]):
        print(b, "->", a)
        df[a] = df[a].combine_first(df[b])
        del df[b]

```

Note (in case you haven't noticed) that when multiple columns end up being merged, it's possible to have order-dependent behavior. For example:

```
     A    B   C
0   NaN   1   2 
1   10   NaN NaN

```

Here you could either merge `B` or `C` into `A`, but not both. Such problems aside, multiple columns can be merged into one since the merged column is saved in place of one of the compared columns.
et voila

```
test = df.B == df.D
df.loc[test,'myunion'] = df.loc[test, 'B']
df.loc[!test ,'myunion'] = df.loc[!test, 'B'].fillna(0) + df.loc[!test, 'D'].fillna(0)

```