0

I have a pandas dataframe file in another directory shown below. I import that file, ES_15M_Trend_Identifier, as follows:

import sys 
import os
sys.path.append(os.path.abspath(r"C:\\Users\\cost9\\OneDrive\\Documents\\PYTHON\\Daily Tasks\\Individual Trading\\ES")) 

import ES_15M_Trend_Identifier
ES_15M_Trend_Identifier.py

I'm folowing the directions given on SO:

How to run multiple python file in a folder one after another

but I get the following error:

AttributeError: 'module' object has no attribute 'py' 

I usually don't have problems importing other python files and don't think that's the issue. The error above is referring to the last line 'ES_15M_Trend_Identifier.py'

Cole Starbuck
  • 603
  • 3
  • 11
  • 21
  • 1
    What do you want to accomplish by the line `ES_15M_Trend_Identifier.py`? (Hint: It is useless and causes the error.) – DYZ Jun 03 '17 at 03:38
  • Haha I'm just trying to execute the entire file there. So I want to call the py file ES_15M_Trend_Identifier and then execute it. – Cole Starbuck Jun 03 '17 at 11:24
  • The other file I'm importing creates a dataframe, then converts it to csv after modifying it. – Cole Starbuck Jun 03 '17 at 11:35

0 Answers0