Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error Message -
#1
Hi,

I have just completed my python with finance coding, but unfortunately, there is an error. I tried so many times to solve the issue, hope you will help me. thanks a lot

import pandas as pd
import matplotlib.pyplot as plt
import numpy as np

Data = pd.read_csv('C:/DATA.csv', parse_dates=['Date'], dayfirst=True, index_col=['Date'])
Date = Data.index


Error:
Data = pd.read_csv('C:/DATA.csv', parse_dates=['Date'], dayfirst=True, index_col=['Date']) Date = Data.index Traceback (most recent call last): File "<ipython-input-1-a51606cd14f8>", line 1, in <module> Data = pd.read_csv('C:/DATA.csv', parse_dates=['Date'], dayfirst=True, index_col=['Date']) NameError: name 'pd' is not defined
Reply
#2
The error does not match the code shown.
The code has
Data = pd.read_csv('C:/DATA.csv', parse_dates=['Date'], dayfirst=True, index_col=['Date'])
on line 5 , the error says its on line 1, the error code has not imported pandas as pd.
Reply
#3
Hi, Thanks for your reply.
the Problem was at the execution of the code.
May I send you the entire code as MP?
Many thanks
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Get error message in a GAN neural network tutorial jdude50 0 1,674 Oct-22-2020, 11:11 PM
Last Post: jdude50
  Series object error message abhaydd 1 4,883 Aug-11-2019, 01:29 AM
Last Post: boring_accountant
  Error Message: TypeError: unhashable type: 'set' twinpiques 4 18,922 May-22-2019, 02:31 PM
Last Post: twinpiques
  panda, excel - script pauses and doesn't continue running, no error message william 1 2,678 Nov-24-2018, 01:24 AM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020