0

When I try some codes in pandas, the bash code wget is used in colab as the following:

import pandas as pd

!wget abc.com/sales.csv

If I want to use PyCharm to download the above internet file, wget is not recognized. So which command should I use to download this file?

bad_coder
  • 8,684
  • 19
  • 37
  • 59
Blue Sea
  • 123
  • 1
  • 10

1 Answers1

3

Thanks a lot for Regressor's hints! Here is what I test to be successful to share in case anyone meets this issue:

(1) install wget in package in PyCharm

File->Settings->Project->Python Interpreter->+->Input: wget->Install Package

(2) Run the following command

import wget
url = 'abc.com/sales.csv'
filename = wget.download(url)
print(filename)
Blue Sea
  • 123
  • 1
  • 10