I have a csv file like that
Meme1, Meme2, Meme3, Meme4, Meme5, Meme6
Meme1, Meme2, Meme3, Meme99, Meme5, Meme6
Meme5, Meme2, Meme2, Meme4, Meme10, Meme6
Meme99, Meme3, Meme4, Meme4, Meme5, Meme6
I want like that
00000001, 00000010, 00000011, 00000100, 00000101, 00000110
00000001, 00000010, 01100011, 00000100, 00000101, 00000110
00000100, 00000010, 00000010, 00000100, 00001010, 00000110
means every integer should be converted to binary and word meme should be deleted
I am trying but cannot do:(
import pandas as pd
import csv
import numpy as np
dataset = pd.read_csv('datsetcoma.txt')
reader = csv.DictReader(dataset)
print (reader)
# print back the headers
for row in reader:
if row.is_integer:
b=np.binary_repr(10, width=8)
print (b)
foo123bar456?