#secCode,secName,announcementTitle,announcementId,announcementTime
003816,xxx name,2024report,1222913141,1743004800000
< /code>
Die Spalte Zeitzeit ist eindeutig Zeichenfolge - 1743004800000. Wenn ich also versuche, sie zu konvertieren < /p>
df['announcementTime'] = pd.to_datetime(df['announcementTime'], format='%Y-%m-%d').dt.date
< /code>
Ich habe diesen [url=viewtopic.php?t=19803]Fehler erhalten[/url] < /p>
File "/root/miniconda3/lib/python3.12/site-packages/pandas/core/tools/datetimes.py", line 1072, in to_datetime
values = convert_listlike(arg._values, format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/pandas/core/tools/datetimes.py", line 435, in _convert_listlike_datetimes
return _array_strptime_with_fallback(arg, name, utc, format, exact, errors)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: time data "1743004800000" doesn't match format "%Y-%m-%d", at position 0. You might want to try:
- passing `format` if your strings have a consistent format;
- passing `format='ISO8601'` if your strings are all ISO8601 but not necessarily in exactly the same format;
- passing `format='mixed'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.
df['announcementTime'] = pd.to_datetime(df['announcementTime'], format='%Y-%m-%d')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.12/site-packages/pandas/core/tools/datetimes.py", line 1072, in to_datetime
Ich habe ein kleines Problem. Ich speichere einige Datumszeitdaten und die Daten sind < /p> [code]#secCode,secName,announcementTitle,announcementId,announcementTime
003816,xxx name,2024report,1222913141,1743004800000 < /code> Die Spalte Zeitzeit ist eindeutig Zeichenfolge - 1743004800000. Wenn ich also versuche, sie zu konvertieren < /p> df['announcementTime'] = pd.to_datetime(df['announcementTime'], format='%Y-%m-%d').dt.date < /code> Ich habe diesen [url=viewtopic.php?t=19803]Fehler erhalten[/url] < /p> File "/root/miniconda3/lib/python3.12/site-packages/pandas/core/tools/datetimes.py", line 1072, in to_datetime values = convert_listlike(arg._values, format) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/lib/python3.12/site-packages/pandas/core/tools/datetimes.py", line 435, in _convert_listlike_datetimes return _array_strptime_with_fallback(arg, name, utc, format, exact, errors) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: time data "1743004800000" doesn't match format "%Y-%m-%d", at position 0. You might want to try: - passing `format` if your strings have a consistent format; - passing `format='ISO8601'` if your strings are all ISO8601 but not necessarily in exactly the same format; - passing `format='mixed'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this. df['announcementTime'] = pd.to_datetime(df['announcementTime'], format='%Y-%m-%d') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/lib/python3.12/site-packages/pandas/core/tools/datetimes.py", line 1072, in to_datetime [/code]
Ich versuche, die vergangenen Daten ab dem aktuellen Datum zu zeigen, was bedeutet, dass der Benutzer nicht das Vergangenheit vom Datum der Datumswähler auswählen sollte.
Ich habe ein Problem in Spark SQL gestoßen. Es interpretiert ein datetime.date Objekt als mathematische Formel oder Ganzzahl in einer SQL-Anweisung, die ich schreibe. currentDateAndTime =...
Ich habe nach einer intuitiveren Möglichkeit zum Konvertieren zwischen Datentypen in C# gesucht (z. B. eine Aufzählung in einen String) und bin auf die Klasse TypeConverter gestoßen. Ich habe die...
Ich versuche, DataGrideView -Colunmen /Zeilen mit C#
MS MS Access -Spalte (Invoicen) zu drucken, aber wenn ich DataGrideView drucke, zeigt es die Uhrzeit an (00:00:00) Nebendatum. int x =...