Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Using VS Code with google cloud
#1
Using VS Code
I use pandas to import CSV files

    import pandas as pd
    import numpy as np

    import pandas as pd df = pd.read_table('summary.csv', skiprows=3, header=None, names=['id', 'rdate', 'rtype', 'hist', 'scan'], usecols=[0, 1, 2, 3, 4])

When I run the above on my PC C: drive I can access summary.csv and the script run.

I copied the python file and summary.csv to my google drive and tried to run it I get this error:

File b'summary.csv' does not exist

When I run it using PyCharm it works.

Anyone else having this problem?

I worked around the problem by using :

    data_folder = Path('C://Users//gary//pyfiles//charts//')

    # --------------------------------- read from csv ---------------------------
    df = pd.read_csv(data_folder / 'summary.csv', delimiter='\t', skiprows=3, header=None, 
    names=['id', 'rdate', 'rtype', 'hist', 'scan'], usecols=[0, 1, 2, 3, 4])
The problem is that if I want to move the files to another location I will have to edit file again. Not a very good work around.
Gary
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  How do I install apps from google play store? using python + selenium.. mongo 0 83 Aug-05-2019, 12:41 AM
Last Post: mongo
  ModuleNotFoundError: No module named 'google.appengine' vanderdecken 0 281 Jul-23-2019, 06:31 AM
Last Post: vanderdecken
  Linking python to Google Sheets Charliefish1311 1 157 Jul-09-2019, 12:31 AM
Last Post: micseydel
  Upload files to Google/Azure/AWS or cloud drives using python tej7gandhi 0 167 May-11-2019, 03:02 PM
Last Post: tej7gandhi
  Blockspring Trello export to Google Sheet Shafla 0 229 Apr-10-2019, 09:21 PM
Last Post: Shafla
  Search "Places near by me" or "where am I" in google maps barry76 1 255 Feb-07-2019, 04:10 PM
Last Post: snippsat
  Error: No module named 'google' Amit0503 0 939 Dec-27-2018, 07:24 AM
Last Post: Amit0503
  google-auth requirements.txt strange behavior randalpinto 3 426 Dec-21-2018, 02:03 AM
Last Post: Larz60+
  Code Wireless Temperature sensor and send sensor readings to google sheet jenkins43 0 357 Nov-29-2018, 12:44 PM
Last Post: jenkins43
  Google documents arsenal58 2 403 Nov-20-2018, 05:13 PM
Last Post: arsenal58

Forum Jump:


Users browsing this thread: 1 Guest(s)