import pandas as pd
import csv
import re


def remove_urls (text):
	text = re.sub(r'(https|http)?:\/\/(\w|\.|\/|\?|\=|\&|\%)*\b', '', text, flags=re.MULTILINE)
	return(text)

xlsx = pd.ExcelFile('Tweets_Mg.xlsx')
df = pd.read_excel(xlsx, 'sheet')
text = []
classe = []

for i in df.itertuples():
	text.append(remove_urls(i.text))
	classe.append(i.classificacao)


writer = pd.ExcelWriter('out.xlsx')
dff = pd.DataFrame(text, classe)
dff.to_excel(writer,'Sheet1')
writer.save()



print(text)
print(classe)
7746e799f5e902556dee76d33c195964562ac648
<mask token>


def remove_urls(text):
    text = re.sub('(https|http)?:\\/\\/(\\w|\\.|\\/|\\?|\\=|\\&|\\%)*\\b',
        '', text, flags=re.MULTILINE)
    return text


<mask token>

<mask token>


def remove_urls(text):
    text = re.sub('(https|http)?:\\/\\/(\\w|\\.|\\/|\\?|\\=|\\&|\\%)*\\b',
        '', text, flags=re.MULTILINE)
    return text


<mask token>
for i in df.itertuples():
    text.append(remove_urls(i.text))
    classe.append(i.classificacao)
<mask token>
dff.to_excel(writer, 'Sheet1')
writer.save()
print(text)
print(classe)

<mask token>


def remove_urls(text):
    text = re.sub('(https|http)?:\\/\\/(\\w|\\.|\\/|\\?|\\=|\\&|\\%)*\\b',
        '', text, flags=re.MULTILINE)
    return text


xlsx = pd.ExcelFile('Tweets_Mg.xlsx')
df = pd.read_excel(xlsx, 'sheet')
text = []
classe = []
for i in df.itertuples():
    text.append(remove_urls(i.text))
    classe.append(i.classificacao)
writer = pd.ExcelWriter('out.xlsx')
dff = pd.DataFrame(text, classe)
dff.to_excel(writer, 'Sheet1')
writer.save()
print(text)
print(classe)

import pandas as pd
import csv
import re


def remove_urls(text):
    text = re.sub('(https|http)?:\\/\\/(\\w|\\.|\\/|\\?|\\=|\\&|\\%)*\\b',
        '', text, flags=re.MULTILINE)
    return text


xlsx = pd.ExcelFile('Tweets_Mg.xlsx')
df = pd.read_excel(xlsx, 'sheet')
text = []
classe = []
for i in df.itertuples():
    text.append(remove_urls(i.text))
    classe.append(i.classificacao)
writer = pd.ExcelWriter('out.xlsx')
dff = pd.DataFrame(text, classe)
dff.to_excel(writer, 'Sheet1')
writer.save()
print(text)
print(classe)

import pandas as pd
import csv
import re


def remove_urls (text):
	text = re.sub(r'(https|http)?:\/\/(\w|\.|\/|\?|\=|\&|\%)*\b', '', text, flags=re.MULTILINE)
	return(text)

xlsx = pd.ExcelFile('Tweets_Mg.xlsx')
df = pd.read_excel(xlsx, 'sheet')
text = []
classe = []

for i in df.itertuples():
	text.append(remove_urls(i.text))
	classe.append(i.classificacao)


writer = pd.ExcelWriter('out.xlsx')
dff = pd.DataFrame(text, classe)
dff.to_excel(writer,'Sheet1')
writer.save()



print(text)
print(classe)