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 matplotlib.pyplot as plt | |
import numpy as np | |
import csv as csv | |
def no_commas(num): | |
if num == '': | |
num = 0 | |
else: | |
num = num.replace(',', '') | |
return float(num) |
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 matplotlib.pyplot as plt | |
import numpy as np | |
import csv as csv | |
def no_commas(num): | |
if num == '': | |
num = 0 | |
else: | |
num = num.replace(',', '') | |
return float(num) |
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 csv | |
def social_data(var): | |
if var == '': | |
var = 0 # assigns value of zero when not present in scraped data | |
else: | |
var = var.replace(',', '') # replaces commas | |
return float(var) # converts string to float #No need to change any part of thise function | |
def clean_social_data(fin, n, o, p): #Multiple arguments? I need to read 3 different columns in the csv file at one time |
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 csv | |
def social_data(var): | |
if var == '': | |
var = 0 # assigns value of zero when not present in scraped data | |
else: | |
var = var.replace(',', '') # replaces commas | |
return float(var) # converts string to float #No need to change any part of thise function | |
def clean_social_data(fin, n, o, p): #Multiple arguments? I need to read 3 different columns in the csv file at one time |