# Detects correct names even with capitals
format_generic(data_generic1)
# In other cases, names can be specified explicitly:
format_generic(
data_generic2,
date = "Date.Transaction",
currency = "Coin",
quantity = "Amount",
total.price = "Price",
transaction = "Type",
fees = "Fee",
exchange = "Platform"
)
# If total.price is missing, it will calculate it based
# on the spot.rate, if available
format_generic(data_generic3)
# If both total.price and spot.rate are missing, it will
# scrap the spot.rate from coinmarketcap based on the coin:
format_generic(data_generic4)
Run the code above in your browser using DataLab