Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Ya.. that's not how python works
It would have to be something like:
X = ("hello ", "world ") -
@Gowtham95india it doesn't give syntax errors because that is actually a "feature" aka another random thing that python let's you do.
-
@noctemx
I'm working huge list of JSON files,
Making pandas, dataframe, and then write to parquet.
Each time, it picks up a file and then process it. When I'm running manually line by line, everything is fine. ( Here I'm just verifying the data frame, not any lists and writing to parquet )
When I'm running the entire script it is failing. Lastly I decided to take a look at the declared variables, and I found this. :( :/ -
@evilmupp3t
It is not a problem to explain 📣🔊🎹
It is pain to share.
I was having defined columns., Which I'll check whether the column is there in the dataframe or not.
So one of the defined column is supposed to be, 'seller_name' and 'adtracking', but because of the above mistake, it became
'seller_name_adtracking'. Which obviously doesn't exists in the dataframe which is throwing errors. -
@Gowtham95india and if u call json.load(filename) to get your json as a python object, you don't have to read line by line in the first place.
-
@evilmupp3t
Why holding the data in another variable.
Import pandas as pd
f = 'file:///var/file.json'
df=pd.read_json(f, lines=True)
Damn python. This actual wasted me 2 hours of time.
Why Python, why?
Anyone faced this?
undefined
python comma lists newline