Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
data_fusion_p1/4) mergecsv.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
26 lines (23 sloc)
851 Bytes
This file contains 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
# merge the data from android and ios | |
import csv | |
import glob | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from datetime import date, timedelta, datetime | |
from pylab import scatter, show, title, xlabel, ylabel, plot, contour | |
import re | |
import os, time | |
import datetime | |
from collections import defaultdict | |
#import itertoolsdcfnbh | |
import math | |
import numpy | |
############## This script merges android and ios files from mapgpsdata script. | |
a = pd.read_csv("matchedgps_androidcheck.csv",low_memory=False) | |
b = pd.read_csv("matchedgps_ioscheck.csv",low_memory=False) | |
#b.columns=["Userid", "BSSID", "Longitude", "Latitude", "wifi_senseStartTimeMillis","gps_senseStartTimeMillis"] | |
#b = b.dropna(axis=1) | |
#merged = a.merge(b, on='title') | |
merged = pd.concat([a,b]) | |
merged.to_csv("mergedbssid_final.csv", index=False) # final merged file. |