Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datetime (with 0 for time) returns as iso formatted string instead of date formatted cell #234

Open
fzumstein opened this issue Feb 6, 2025 · 0 comments

Comments

@fzumstein
Copy link
Member

fzumstein commented Feb 6, 2025

example to replicate

  CSV_URL = "https://raw.githubusercontent.com/datasets/covid-19/main/data/countries-aggregated.csv"

  # Fetch CSV data using httpx
  with httpx.Client() as client:
      response = client.get(CSV_URL)
      response.raise_for_status()  # Raise an error for bad responses

  # Convert the response text into a Pandas DataFrame
  df = pd.read_csv(io.StringIO(response.text))


  # Perform some basic data cleaning
  df['Date'] = pd.to_datetime(df['Date'])

this should also not happen:

 UserWarning: Discarding nonzero nanoseconds in conversion.
  return x.to_pydatetime().replace(tzinfo=None).isoformat()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant