What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-04 12:01:14
Considering the Census Income data with response variable as Income(>50k and <=50k).
def load_dataset(path, urls): if not os.path.exists(path): os.mkdir(path) for url in urls: data = requests.get(url).content filename = os.path.join(path, os.path.basename(url)) with open(filename, "wb") as file:... Add solution -
Python 2021-10-27 11:30:07
python file from path
import os print(os.path.basename(your_path)) Add solution -
Python 2021-10-16 14:54:07
python get filename from path
import os print(os.path.basename(your_path)) Add solution