How to read the file which is in other directory?
Question: My project

    
    
    et->datacollector
      ->eventprocessor->multilang->resources->python->tenderevent->rules->Table.py
                      ->target->inpout->Read.csv
    

Table.py

    
    
    import pandas as pd
    df_LFB1 = pd.read_csv('Read.csv', sep = ',', usecols = [1,2,7,59])
    

Now above I want to use `Read.csv` file how should I give the directory of
`Read.csv` file in `pd.read_csv`


Answer: 
    import os
    os.getcwd()
    Out[42]: '/Users/Documents'
    ## os.path.abspath(__file__) ## inside script
    

If I have the `'Read.csv'` file in my current working directory
`'/Users/Documents'`, I can read the file like below.

    
    
    df_LFB1 = pd.read_csv('Read.csv', sep = ',', usecols = [1,2,7,59])
    

and if my file is not in current working dierctory but in some other directory
lets say `et` directory is in `/home/project`,

    
    
    df_LFB1 = pd.read_csv(r'/home/project/et/eventprocessor/target/inpout/ Read.csv',
                                         sep = ',', usecols = [1,2,7,59])
    

Above statement will read the file.

Note: when you provide absolute path to file. It doesnt not matter where your
script resides.

