filmov
tv
Pandas importing error in python | RuntimeError The current Numpy installation | python | Panda

Показать описание
This issue occurs due to your system has installed numpy version 1.19.4 , so to solve the current issue we need to install numpy==1.19.3, it's bug in
numpy==1.19.4, hope developer should fix bug in coming version.
Follow the instruction carefully you can solve the issue
For windows users
1. Open Command prompt
2. type "python -m pip install --user numpy==1.19.3" without quote
For unix or Linux or Mac users
1. Open terminal
2. type "pip3 install numpy==1.19.3" without quote
pip depends on version of python installed in your
system. For version 2.x use "pip" and for version 3.x use "pip3"
Sample Program to write and read CSV file using Pandas
...................................Example...................................................
import pandas as pd
#Function to write CSV file
def csv_write():
csv_write_data = pd.DataFrame([['Kathandu', 'Bagmati'],
['Pokhara', 'Gandaki']],
columns=['City', 'State'])
#Fuction to Read CSV file
def csv_read():
print(csv_read_data)
if __name__ == "__main__":
csv_write()
csv_read()
.........................................OUTPUT.............................................................
Unnamed: 0 City State
0 0 Kathandu Bagmati
1 1 Pokhara Gandaki
That's it.
Enjoy!!!!
numpy==1.19.4, hope developer should fix bug in coming version.
Follow the instruction carefully you can solve the issue
For windows users
1. Open Command prompt
2. type "python -m pip install --user numpy==1.19.3" without quote
For unix or Linux or Mac users
1. Open terminal
2. type "pip3 install numpy==1.19.3" without quote
pip depends on version of python installed in your
system. For version 2.x use "pip" and for version 3.x use "pip3"
Sample Program to write and read CSV file using Pandas
...................................Example...................................................
import pandas as pd
#Function to write CSV file
def csv_write():
csv_write_data = pd.DataFrame([['Kathandu', 'Bagmati'],
['Pokhara', 'Gandaki']],
columns=['City', 'State'])
#Fuction to Read CSV file
def csv_read():
print(csv_read_data)
if __name__ == "__main__":
csv_write()
csv_read()
.........................................OUTPUT.............................................................
Unnamed: 0 City State
0 0 Kathandu Bagmati
1 1 Pokhara Gandaki
That's it.
Enjoy!!!!
Комментарии