I'd like to create a python script that reads .CSV bank statements, that collates a list of people I have paid money to and the amount of money I have paid to them in the statement. I would like that data to be saved into a new .CSV file. Could you write me some code that would do that?
Sure! Here's an example of code that does what you described using the csv module in Python:

import csv

# Input file name
filename = bank_statement.csv

# Output file name
output_file = payees.csv

# Dictionary to store the payees and their total payment
payees = {}

# Read the input CSV file
with open(filename, r) as file:
    reader = csv.DictReader(file)
    for row in reader:
        payee = row[Payee]
        amount = float(row[Amount])
        if payee in payees:
            payees[payee] += amount
        else:
            payees[payee] = amount

# Write the payee information to the output CSV file
with open(output_file, w) as file:
    writer = csv.writer(file)
    writer.writerow([Payee, Total Payment])
    for payee, amount in payees.items():
        writer.writerow([payee, amount])

This code assumes that the input .CSV file has a header row with the following columns: Payee, Amount. You can modify the code to fit your specific input file format.
Let's say I have date column.Can you add separation by month?