Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8446301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:53:40+00:00 2026-06-10T09:53:40+00:00

I am trying to plot water-level hydrogaphs for multiple wells. The data are in

  • 0

I am trying to plot water-level hydrogaphs for multiple wells. The data are in a text file with the first column a date in the format 'yyyymmdd'. In this particular case, there are 35 other columns with float numbers.

I have been trying to use genfromtxt, but I don’t want to have to define all 36 dtypes.

I tried dtype=None with converters, but then I get the message that the converter is locked and cannot be updated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:53:42+00:00Added an answer on June 10, 2026 at 9:53 am

    I’m surprised you can’t use np.genfromtxt with a converter argument to transform your first column into either :

    • a np.datetime64 object (as @DSM suggests, provided you have a version of numpy recent enough (>1.6.1))
    • a np.object, with a converter as:

      converter={0:lambda d: datetime.datetime.strptime(d,"%Y%m%d")

    If you don’t want to define the dtype yourself, you could use dtype=None. It’s not that good of an idea, though, as this option is notably slower than giving an explicit dtype.
    But as the documentation tells you, you can use a tuple to define your dtype, so something like:

    dtype=tuple([np.datetime64] + [float]*35)
    

    or

    dtype=tuple([np.object] + [float]*35)
    

    could work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying plot data sets consisting of 3 coordinates: X-coordinate, x-coordinate and the
I'm trying to plot values as a function of the date (only hh:mm:ss, without
I am trying to plot a graph using gnuplot. I have six text files.
I am trying to plot this kind of behaviour of a data set. I
I am trying to plot some data using pylab scatter function. I'm using pylab.scatter(X,
I am trying to plot some test data (show at the end of this
I am trying to plot side by side the following datasets dataset1=data.frame(obs=runif(20,min=1,max=10)) dataset2=data.frame(obs=runif(20,min=1,max=20)) dataset3=data.frame(obs=runif(20,min=5,max=10))
I'm trying to plot two sets of data wrt to time on the same
I'm trying to plot heatmap in ggplot2 using csv data following casbon's solution in
I'm currently trying to use the core-plot library to graph some data I get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.