Wpis z mikrobloga

@CancerLight: Dzięki. A co tu robię niepoprawnie bo wywala errory..

import pandas as pd
import hashlib

# reading CSV input
df = pd.readcsv('users.csv')

# hashing
df['password'] = df['password'].apply(lambda x:
hashlib.sha256(x.encode('utf-8')).hexdigest())
df['pesel'] = df['pesel'].apply(lambda x:
hashlib.sha256(x.encode('utf-8')).hexdigest())

# writing the new CSV output
df.to
csv('users_hashed.csv', index=False)
  • Odpowiedz