Python in Hydrology and Hydraulics

Python programming, with examples in hydraulic engineering and in hydrology.

Thursday, June 13, 2019

Find Maximum Values by year in timeseries dataframe, keeping the date


df2=df1.ix[df1.groupby(df1.index.year).idxmax().iloc[:,0]]
Posted by Rodrigo at 10:52 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: DataFrame, groupby, maximum, pandas
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • Pandas - How to read text files delimited with fixed widths
    With Python Pandas library it is possible to easily read fixed width text files, for example: In this case, the text file has its first...
  • Solving Manning's equation with Python
    Manning's equation is a very common formula used in hydraulic engineering. It is an empirical formula that estimates the average velocit...
  • SciPy minimize example - Fitting IDF Curves
    SciPy (pronounced “Sigh Pie”) is an open source Python library used by scientists, analysts, and engineers doing scientific computing and t...
  • Solving Manning's equation for channels with Python
    Manning's equation is a very common formula used in hydraulic engineering. It is an empirical formula that estimates the average veloci...
  • Exponential curve fit in numpy
    With numpy function "polyfit" we can easily fit diferent kind of curves, not only polynomial curves. According to the users manua...

Search in posts by:



Author

Followers

Main Subjects

  • pandas (22)
  • PyQGIS (12)
  • qgis (9)
  • datetime (7)
  • precipitation (7)
  • Excel (6)
  • numpy (6)
  • regression (5)
  • timeseries (5)
  • idf (4)
  • Chart (3)
  • manning's formula (3)
  • scipy (3)
  • flow (2)
  • geometry (2)
  • hydrology (2)
  • statistics (2)
  • hydraulics (1)
  • probability (1)

Blog Archive

  • ►  2022 (1)
    • ►  August (1)
  • ►  2021 (2)
    • ►  April (1)
    • ►  March (1)
  • ►  2020 (1)
    • ►  July (1)
  • ▼  2019 (6)
    • ►  October (1)
    • ▼  June (1)
      • Find Maximum Values by year in timeseries datafram...
    • ►  May (1)
    • ►  April (2)
    • ►  January (1)
  • ►  2018 (13)
    • ►  November (1)
    • ►  September (1)
    • ►  August (1)
    • ►  July (2)
    • ►  June (1)
    • ►  May (2)
    • ►  April (1)
    • ►  February (2)
    • ►  January (2)
  • ►  2017 (16)
    • ►  November (2)
    • ►  September (1)
    • ►  August (1)
    • ►  July (4)
    • ►  June (5)
    • ►  March (2)
    • ►  February (1)
  • ►  2016 (6)
    • ►  November (1)
    • ►  October (1)
    • ►  July (1)
    • ►  April (1)
    • ►  March (1)
    • ►  February (1)
  • ►  2015 (19)
    • ►  December (4)
    • ►  November (11)
    • ►  October (4)

Contact me if you need help with any similar problem

Name

Email *

Message *

Python in Hydrology and Hydraulics

Python in Hydrology and Hydraulics

Donate with Paypal

Total Pageviews

Labels

pandas python PyQGIS DataFrame qgis datetime precipitation Excel numpy Clipboard regression timeseries idf text files Chart PyQt4 accumulated curve fit manning's formula polyfit rain read read files scipy CSV Line Open File Open folder PLotting Charts String Time series column download exponential fitting idf curves flow formula geometry groupby hydrology install list manning manning formula minimize monthly newton-raphson points series statistics string manipulation Alternating block method Capture Screen Getting Input Input Window NaN Null OSGeo4W PIL Plugin Builder Plugin Reloader Polygon Print Screen Python Excel Macro Python Macro Python for Excel QApplication QtGui R-squared SWMM5 Tabulation about active layer activeLayer() aggregate apply arange bar batch file process beginners between rows blog button centroid channel clockwise combinations common timespan common years concatenate counterclockwise data manipulation date_range delimited text direction distance drawing euclidean distance excerpts exif extract filter fit fixed width float folder getting started gps graph gumbel hints histogram how to use html hydraulics hydrograph hyetograph incremental interpolation itertools jpg learn linear regression lines links logarithmic manning's math matplotlib maximum modules multi-linear multilinear multiple linear multiple linear regression numerical methods one liner opening pictures pip pivot table plot plt plugin polyline polynomial probability python editor python install python3 r2_score rainfall rainfall events regex requests rolling scikit-learn setup.py shift site solve solve manning's equation in python solving manning sort synthetic table text text string timestamp tips tutorial values web win32clipboard window windows winpython year yearly
DONATE BITCOINS

1HBcizT55DZ44WVW93CjL7DWiD8hyGxxfB

About Me

Rodrigo
View my complete profile
Powered by Blogger.