Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Use of PIL.Image
Post: RE: Use of PIL.Image
Its refreshing that another person has the same experience. Thank you for sharing. |
|
nafshar |
General Coding Help |
12 |
2,146 |
Sep-07-2023, 11:02 PM |
|
|
Thread: Use of PIL.Image
Post: RE: Use of PIL.Image
You can either use pip on the console window or use the package manager. I tend to use the package manager. |
|
nafshar |
General Coding Help |
12 |
2,146 |
Sep-07-2023, 03:11 AM |
|
|
Thread: Use of PIL.Image
Post: RE: Use of PIL.Image
@deanhystad
After a lot of trials and errors, I arrived at the following solution:
The np.array(image) has no issues as you suggested. The error that appears when I hover over this line, still persi... |
|
nafshar |
General Coding Help |
12 |
2,146 |
Sep-07-2023, 12:15 AM |
|
|
Thread: Use of PIL.Image
Post: RE: Use of PIL.Image
Quote: I am using Python 3.10.11, Pydantic 1.10.7 and typing_extensions 4.5.0
|
|
nafshar |
General Coding Help |
12 |
2,146 |
Sep-06-2023, 12:45 AM |
|
|
Thread: Use of PIL.Image
Post: RE: Use of PIL.Image
@deanhystad - Thank you so much for looking into this issue. I think you are correct that my issue is not with line 22. I think if I can find out why I am getting the following error, I may be able to... |
|
nafshar |
General Coding Help |
12 |
2,146 |
Sep-05-2023, 11:53 PM |
|
|
Thread: Use of PIL.Image
Post: RE: Use of PIL.Image
(Sep-05-2023, 07:55 PM)nafshar Wrote: @deanhystad
I am reposting both the code and the actual error to make sure the error line numbers match up with the code.
This code expects an image posted f... |
|
nafshar |
General Coding Help |
12 |
2,146 |
Sep-05-2023, 08:14 PM |
|
|
Thread: Use of PIL.Image
Post: RE: Use of PIL.Image
@deanhystad
I am reposting both the code and the actual error to make sure the error line numbers match up with the code.
This code expects an image posted from an http/post method. I am trying to ... |
|
nafshar |
General Coding Help |
12 |
2,146 |
Sep-05-2023, 07:55 PM |
|
|
Thread: Use of PIL.Image
Post: Use of PIL.Image
The following code generates an error which I am not understanding:
from fastapi import FastAPI, File, UploadFile
import uvicorn
import numpy as np
from io import BytesIO
from PIL import Image
import... |
|
nafshar |
General Coding Help |
12 |
2,146 |
Sep-05-2023, 06:55 PM |
|
|
Thread: DataFRame.concat()
Post: RE: DataFRame.concat()
Dean - Thank you for the brilliant suggestions. Sometimes a fresh set of eyes work best. I was trying to change an existing code with minimal changes and did not even think of altering the structure. ... |
|
nafshar |
General Coding Help |
3 |
795 |
Jul-14-2023, 04:41 PM |
|
|
Thread: DataFRame.concat()
Post: RE: DataFRame.concat()
(Jul-14-2023, 04:29 PM)deanhystad Wrote: I don't understand why you are making all these dataframes. I would collect the data and make one. I don't know the shape of the data returned by the reque... |
|
nafshar |
General Coding Help |
3 |
795 |
Jul-14-2023, 04:41 PM |
|
|
Thread: DataFRame.concat()
Post: DataFRame.concat()
I am trying to convert from DataFrame.append() which has been deprecated to DataFrame.concat() and having some issues with an otherwise working code as below. The commented section works just fine wit... |
|
nafshar |
General Coding Help |
3 |
795 |
Jul-14-2023, 01:24 PM |
|
|
Thread: python dictionary syntax
Post: RE: python dictionary syntax
(Apr-24-2023, 06:26 PM)nafshar Wrote: can someone explain how the following dictionary definition is supposed to work?
Pycharm shows it as a syntaxial error, but the class I am taking shows it valid... |
|
nafshar |
General Coding Help |
2 |
887 |
Apr-24-2023, 06:50 PM |
|
|
Thread: python dictionary syntax
Post: python dictionary syntax
can someone explain how the following dictionary definition is supposed to work?
Pycharm shows it as a syntaxial error, but the class I am taking shows it valid:
payload = {'email': 'password': 'badp... |
|
nafshar |
General Coding Help |
2 |
887 |
Apr-24-2023, 06:26 PM |
|
|
Thread: Error using pandas_datareader
Post: RE: Error using pandas_datareader
Apparently this is a "known issue". After replacing the data source form yahoo to stooq. It worked fine.
import pandas_datareader.data as web
start_date = datetime.datetime(2006, 1, 1)
end_date = dat... |
|
nafshar |
Data Science |
1 |
6,418 |
Feb-02-2023, 01:48 PM |
|
|
Thread: Error using pandas_datareader
Post: Error using pandas_datareader
I am trying to read stock data using panda's DataReader and getting an error that I am not sure I understand.
The data source : 'yahoo' is found at the following url:
https://pandas-datareader.readth... |
|
nafshar |
Data Science |
1 |
6,418 |
Feb-02-2023, 01:28 PM |
|
|
Thread: splitting a Dataframe Column in two parts
Post: RE: splitting a Dataframe Column in two parts
|
nafshar |
General Coding Help |
2 |
971 |
Jan-30-2023, 01:19 PM |
|
|
Thread: splitting a Dataframe Column in two parts
Post: splitting a Dataframe Column in two parts
I have a dataframe column for emal addresses and I am trying to find the count of the top domains.
I am sppliting the email using the '@" as the separator and trying to grab the domain part as follow... |
|
nafshar |
General Coding Help |
2 |
971 |
Jan-27-2023, 07:17 PM |
|
|
Thread: returning a List of Lists
Post: RE: returning a List of Lists
(Oct-28-2022, 05:36 PM)nafshar Wrote: I am trying to return an empty list of lists from a function so that, when printed, will look like : [[""]]
But a return like the following result in a printin... |
|
nafshar |
General Coding Help |
3 |
1,082 |
Oct-28-2022, 05:44 PM |
|
|
Thread: returning a List of Lists
Post: returning a List of Lists
I am trying to return an empty list of lists from a function so that, when printed, will look like : [[""]]
But a return like the following result in a printing: []
return [[]]*1
return [[]]I would... |
|
nafshar |
General Coding Help |
3 |
1,082 |
Oct-28-2022, 05:36 PM |
|
|
Thread: NameError
Post: RE: NameError
(Oct-18-2022, 01:45 PM)Gribouillis Wrote: Instead of combo(), call self.combo(). Also you can just write class Solution: It is implicit that object is a parent class.
Thank you Griboullis. Adding "s... |
|
nafshar |
General Coding Help |
3 |
1,027 |
Oct-18-2022, 01:50 PM |