Yahoo Αναζήτηση Διαδυκτίου

Αποτελέσματα Αναζήτησης

  1. 28 Ιουλ 2021 · replace() function is used to manipulate the object of DateTime class of module of DateTime. Generally, it replaces the date( Year, Month, Day) and returns a new DateTime object. Syntax: replace(year=self.year, month=self.month, day=self.day) Parameters: Year: New year value (range: 1 <= year <= 9999)month: New month value(range: 1 <= mont

  2. 28 Φεβ 2010 · I have read an array of strings from a TXT file and saved it as an array (of over thousand values) using such a line: dates = np.genfromtxt('filename.txt', delimiter=";", usecols=(0), dtype=None) Next, I would like to convert strings into dates. I tried to use the line: dates2 = dt.datetime.strptime([dates], '"%Y-%m-%d"').date()

  3. 5 Απρ 2014 · I want to convert it into NumPy's datetime64 type. More precisely, I want to change the data type of the array without looping through a for-loop and copying it element-wise into a new array (the real array is actually very large).

  4. 18 Φεβ 2018 · return [i.replace(year=j) for j in range(year_start, year_end+1) for i in lst] # make list for year range from lst. lst = year_range(lst, 2015, 2018) # [datetime.datetime(2015, 1, 1, 0, 1), # datetime.datetime(2016, 1, 1, 0, 1), # datetime.datetime(2017, 1, 1, 0, 1), # datetime.datetime(2018, 1, 1, 0, 1),

  5. classmethod datetime. fromisoformat (date_string) ¶ Return a datetime corresponding to a date_string in any valid ISO 8601 format, with the following exceptions: Time zone offsets may have fractional seconds. The T separator may be replaced by any single unicode character. Fractional hours and minutes are not supported.

  6. To construct a datetime from a string using .strptime(), you have to tell Python what each of the parts of the string represents using formatting codes from the mini-language. You can try this example to see how .strptime() works:

  7. When creating an array of datetimes from a string, it is still possible to automatically select the unit from the inputs, by using the datetime type with generic units. An array of datetimes can be constructed from integers representing POSIX timestamps with the given unit.

  1. Γίνεται επίσης αναζήτηση για