Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2021 09:43 AM
USE REPOS! 😁
Repos is able to call a function that is in a file in the same Github repo as long as Files is enabled in the admin panel.
So if I have utils.py with:
import pandas as pd
def clean_data():
# Load wine data
data = pd.read_csv("/dbfs/databricks-datasets/wine-quality/winequality-white.csv", sep=";")
print(data)
# Remove spaces from column names
data.rename(columns=lambda x: x.replace(' ', '_'), inplace=True)`my notebook can call above with this:
import utils
utils.clean_data()