2

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
  • 11,289
  • 20
  • 44
  • 72
Blue Sea
  • 321
  • 1
  • 3
  • 12

1 Answers1

5

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
  • 321
  • 1
  • 3
  • 12