|
11 | 11 | import os |
12 | 12 | import pandas as pds |
13 | 13 | import requests |
14 | | -import warnings |
15 | 14 |
|
16 | 15 | import pysat |
17 | 16 |
|
@@ -300,54 +299,6 @@ def common_metadata(): |
300 | 299 | return meta, status_desc |
301 | 300 |
|
302 | 301 |
|
303 | | -def load_csv_data(fnames, read_csv_kwargs=None): |
304 | | - """Load CSV data from a list of files into a single DataFrame. |
305 | | -
|
306 | | - .. deprecated:: 0.0.5 |
307 | | - `load_csv_data` will be removed in pysatSpaceWeather 0.0.6+, as it has |
308 | | - been moved to `pysat.instruments.methods.general` as of pysat 3.0.1. |
309 | | -
|
310 | | - Parameters |
311 | | - ---------- |
312 | | - fnames : array-like |
313 | | - Series, list, or array of filenames |
314 | | - read_csv_kwargs : dict or NoneType |
315 | | - Dict of kwargs to apply to `pds.read_csv`. (default=None) |
316 | | -
|
317 | | - Returns |
318 | | - ------- |
319 | | - data : pds.DataFrame |
320 | | - Data frame with data from all files in the fnames list |
321 | | -
|
322 | | - See Also |
323 | | - -------- |
324 | | - pds.read_csv, pysat.instruments.methods.general.load_csv_data |
325 | | -
|
326 | | - """ |
327 | | - |
328 | | - warnings.warn("".join(["Moved to pysat.instruments.methods.general.", |
329 | | - "load_csv_data in pysat version 3.0.1. This method ", |
330 | | - "will be removed at the 0.0.6+ release."]), |
331 | | - DeprecationWarning) |
332 | | - |
333 | | - # Ensure the filename input is array-like |
334 | | - fnames = np.asarray(fnames) |
335 | | - if fnames.shape == (): |
336 | | - fnames = np.asarray([fnames]) |
337 | | - |
338 | | - # Initialize the optional kwargs |
339 | | - if read_csv_kwargs is None: |
340 | | - read_csv_kwargs = {} |
341 | | - |
342 | | - # Create a list of data frames from each file |
343 | | - fdata = [] |
344 | | - for fname in fnames: |
345 | | - fdata.append(pds.read_csv(fname, **read_csv_kwargs)) |
346 | | - |
347 | | - data = pds.DataFrame() if len(fdata) == 0 else pds.concat(fdata, axis=0) |
348 | | - return data |
349 | | - |
350 | | - |
351 | 302 | def ace_swepam_hourly_omni_norm(as_inst, speed_key='sw_bulk_speed', |
352 | 303 | dens_key='sw_proton_dens', |
353 | 304 | temp_key='sw_ion_temp'): |
|
0 commit comments