Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 days ago.
Improve this question
I tried reading a parquet file using spark and python. Both are not working and returning file not found error although files are present at the particular location. File path is correct.
Spark read: spark.read.parquet('/mnt/evdl/data/mms/02-curated/xxx.delta/123445.snappy.parquet')
python.
import numpy as np
import pandas as pd
import pyarrow.parquet as pq
import warnings
warnings.filterwarnings('ignore')
df1=pq.read_table('/dbfs/mnt/evdl/data/mms/02-curated/xxx.delta/part-9398384444.snappy.parquet').to_pandas()
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 days ago.
This post was edited and submitted for review 7 days ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
File ".../tools/utils.py", line 10, in <module>
from tools import utils
ImportError: cannot import name utils
I am receiving this error when I try to run the script.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 days ago.
Improve this question
I don't see any circular dependency, no misspelling, and no misposition of my class. It is still having an import error nonetheless.
I tried writing a function to take in a string, and return that string but all uppercase, and with all of the "S" characters removed. I was expecting to be able to import this into my test file under the same directory, but it is unable to import.enter image description here
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
ImportError: cannot import name 'HTML' from 'IPython' (C:\Users\sriva\Anaconda3\lib\site-packages\IPython\__init__.py)
you should import html like this:
from IPython.display import HTML
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I am performing a machine learning implementation on a data given in json format.
I haven't tried much because I have no experience.
My code to read is:
with open('attempts.json') as my_file:
d = json.load(my_file)
I am getting error like:
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I have replaced my attempts.json file which was 260mb to grades.json which is 12kb but still having same problem.
Your json file must have content and the format is correct.
Based on this error, I think your json file is empty.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 months ago.
Improve this question
I am trying to load a .csv file lying on my desktop using pandas on jupyter notebook and getting the following error:
What's the problem with the code? The same method works on windows. (I'm using ubuntu 16.04 LTS)
Try passing encoding='utf-8' argument in your read_csv function, like this:
data = pd.read_csv('file_name.csv', encoding='utf-8')
filepath = r"/home/aditisp/Documents/Untitled Folder/sonar_data.csv"
##the preceding r denotes a string literal
df = pd.read_csv(filepath)
print(df.head())
This worked for me.